1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-25 00:02:41 +01:00
phorge-phorge/src/applications/people
epriestley b12f13efd8 Force date/time preferences to valid values
Summary:
Fixes T8601. To reproduce the problem:

  - Set your time preference to `""` (the empty string). This isn't possible from the modern UI, but can be done with "Right Click > Inspect Element", or users may have carried it forward from an older setting (this is the case with me and @hach-que on this install).
  - Load Calendar with some events.
  - This parses an epoch, which sets `valueTime` to `""` (since there are no format characters in the preference) and then `getEpoch()` fails because `strlen($time)` is 0.
  - Since `getEpoch()` failed, `getDateTime()` also fails.

To fix this:

  - Only permit the date and time preferences to have valid values.

Test Plan:
  - Loaded page before patch, saw fatal.
  - Applied patch.
  - No more fatal.
  - Viewed tooltips, dates/times, dates/times in other apps.
  - Changed my preferences, saw them respected.

Reviewers: lpriestley

Reviewed By: lpriestley

Subscribers: epriestley, hach-que

Maniphest Tasks: T8601

Differential Revision: https://secure.phabricator.com/D13346
2015-06-18 15:11:01 -07:00
..
application Implement a scope selector for the global search 2015-04-22 14:31:36 -07:00
capability People - refine permissions on creating new users 2015-02-05 16:47:09 -08:00
conduit Add "Mailing List" users 2015-06-03 18:42:33 -07:00
config Add getGroup to ConfigOptions 2015-02-09 13:10:56 -08:00
controller Add "Mailing List" users 2015-06-03 18:42:33 -07:00
customfield Add "Mailing List" users 2015-06-03 18:42:33 -07:00
editor Add "Mailing List" users 2015-06-03 18:42:33 -07:00
event People - fix hovercards for people 2015-05-18 15:39:34 -07:00
garbagecollector Add a GC for user logs 2014-02-03 10:51:41 -08:00
lipsum Rename PhutilRealnameContextFreeGrammar for consistency 2015-01-06 12:04:19 +11:00
markup Replace user "status" with "availability" 2015-05-14 11:15:04 -07:00
phid Add "Mailing List" users 2015-06-03 18:42:33 -07:00
query Fix method visibilities 2015-06-09 07:17:44 +10:00
search Rename PHIDType classes 2014-07-24 08:05:46 +10:00
storage Force date/time preferences to valid values 2015-06-18 15:11:01 -07:00
typeahead Mark some strings for translation 2015-06-09 23:06:52 +10:00
view Let users review their own account activity logs 2014-04-27 17:32:09 -07:00