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
Unknown Object (File)
May 6 2025, 6:54 AM
Unknown Object (File)
Apr 21 2025, 2:09 AM
Unknown Object (File)
Mar 28 2025, 11:32 PM
Unknown Object (File)
Mar 26 2025, 11:06 AM
Unknown Object (File)
Mar 5 2025, 4:32 AM
Unknown Object (File)
Feb 24 2025, 4:57 AM
Unknown Object (File)
Jan 25 2025, 2:31 AM
Unknown Object (File)
Jan 23 2025, 1:41 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

Lint
Lint Skipped
Unit
Tests Skipped