1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-07 13:21:02 +01:00
phorge-phorge/src/applications/search
epriestley 8c7f114b4d Fix an issue where "Export Data" could fail if a user had a nonempty custom policy preference
Summary:
The "Export Data" workflow incorrectly uses the "Policy Favorites" setting to choose a default export format. This is just a copy/paste error; the correct setting exists and is unused.

If the setting value is an array (as the "Policy Favorites" value often is), we try to use it as an array index. This generates a runtime exception after D21044.

```
[2020-06-16 06:32:12] EXCEPTION: (RuntimeException) Illegal offset type in isset or empty at [<arcanist>/src/error/PhutilErrorHandler.php:263]
  #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer, array) called at [<phabricator>/src/applications/search/controller/PhabricatorApplicationSearchController.php:460]
```

  - Use the correct setting.
  - Make sure the value we read is a string.

Test Plan:
  - Used "Export Data" with a nonempty, array-valued "Policy Favorites" setting.
    - Before: runtime exception.
    - After: clean export.
  - Used "Export Data" again, saw my selection from the first time persisted.

Differential Revision: https://secure.phabricator.com/D21361
2020-06-16 06:44:23 -07:00
..
application Add a test to verify that all routing maps are plausibly valid, and remove some dead routes 2020-02-14 18:06:24 -08:00
applicationpanel Fix Search Application Config 2017-07-18 17:44:56 +00:00
buckets Use new Differential bucketing logic on default (non-dashboard) homepage 2016-05-19 15:20:39 -07:00
compiler Modularize Ferret fulltext functions 2020-04-16 13:41:13 -07:00
constants Create a virtual "core" field in the Ferret engine for "title and body together" 2017-09-01 09:40:56 -07:00
controller Fix an issue where "Export Data" could fail if a user had a nonempty custom policy preference 2020-06-16 06:44:23 -07:00
edge On panel pages, show where panels are used 2019-04-12 06:14:21 -07:00
editor Index and surface usage sites for Dashboards 2019-04-12 06:13:44 -07:00
engine Combine the two different ngram-splitting algorithms into a single engine 2020-04-16 09:45:00 -07:00
engineextension Modularize Ferret fulltext functions 2020-04-16 13:41:13 -07:00
exception Allow administrators to get a list of users who don't have MFA configured 2017-03-15 17:49:01 -07:00
ferret Provide a hint about how to quote search terms containing literal colons 2020-05-03 10:14:47 -07:00
field Support querying projects by "Root Projects" in the UI, and "min/max depth" in the API 2019-10-31 12:56:33 -07:00
fulltextstorage Fix some minor errors (DarkConsole warning, unstable Ferret sort) 2018-03-18 15:12:25 -07:00
garbagecollector Add a garbage collector for common ngrams 2017-10-05 11:41:18 -07:00
index Modularize Ferret fulltext functions 2020-04-16 13:41:13 -07:00
interface Extend "fulltext" and "ngrams" interfaces from "indexable" interface 2017-04-17 12:59:41 -07:00
management Track how many columns use a particular trigger 2019-03-25 14:04:55 -07:00
menuitem Convert dashboard read/display pathways to the new panel storage format 2019-04-14 10:23:42 -07:00
ngrams Combine the two different ngram-splitting algorithms into a single engine 2020-04-16 09:45:00 -07:00
phidtype Rename "ProfilePanelConfiguration" to "ProfileMenuItemConfiguration" 2016-12-11 11:44:22 -08:00
query Modularize Ferret fulltext functions 2020-04-16 13:41:13 -07:00
relationship Render parent and child tasks in Maniphest with a graph trace 2016-07-01 10:41:07 -07:00
storage Remove the "search_documentfield" table 2019-05-23 19:11:38 -07:00
typeahead Rename "QuickSearch" Engine/EngineExtension to "Datasource" 2018-02-14 18:03:03 -08:00
view Add "Contact Numbers" so we can send users SMS mesages 2019-01-23 13:39:56 -08:00
worker Reindex dashboards and panels (allow migrations to queue a job to queue other indexing jobs) 2019-04-17 12:05:49 -07:00