Page MenuHomePhabricator

Fix JavaScript exception when having users with special names
ClosedPublic

Authored by sergey.vfx on Jan 22 2014, 9:56 AM.
Tags
None
Referenced Files
F13896670: D8037.diff
Sun, Oct 6, 3:22 AM
Unknown Object (File)
Mon, Sep 30, 7:23 PM
Unknown Object (File)
Tue, Sep 24, 8:43 AM
Unknown Object (File)
Fri, Sep 20, 5:39 AM
Unknown Object (File)
Sat, Sep 7, 1:18 PM
Unknown Object (File)
Aug 31 2024, 7:27 PM
Unknown Object (File)
Aug 26 2024, 5:52 PM
Unknown Object (File)
Aug 26 2024, 5:46 PM
Subscribers

Details

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).

Diff Detail

Branch
special_login_fix
Lint
Lint Passed
Unit
No Test Coverage