Homec4science

Fix JavaScript exception when having users with special names

Authored by Sergey Sharybin <sergey.vfx@gmail.com> on Jan 22 2014, 18:09.

Description

Fix JavaScript exception when having users with special names

Summary:
The issue was noticed in Firefox when user with login "watch"
was registered in the database. And it was caused by Object
in Firefox having "watch" method.

Solved by checking for whether lookup object does have own
property before using it as a map key.

Test Plan:
To test the issue simply create a user with login "watch",
open the phabricator site in Firefox and try to assign any
maniphest task to this user. You'll see exception being
printed to the javascript console (in my case it's printed
to firebug console).

Reviewers: #blessed_reviewers, epriestley

Reviewed By: epriestley

CC: epriestley, aran

Differential Revision: https://secure.phabricator.com/D8037

Details

Committed
epriestley <git@epriestley.com>Jan 22 2014, 18:10
Pushed
aubortJan 31 2017, 17:16
Parents
rPH5968ed8fd806: Awesomify dragging stuff on workboards
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH83ab275b0f49: Fix JavaScript exception when having users with special names (authored by Sergey Sharybin <sergey.vfx@gmail.com>).Jan 22 2014, 18:10