Note: There are a few cases of duplicates in user autocompletion which are being worked on.

token id defined twice on logged out pages

RESOLVED FIXED in Bugzilla 4.2

Status

()

Bugzilla
User Interface
--
trivial
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: glob, Assigned: reed)

Tracking

Bugzilla 4.2
Bug Flags:
approval +
approval4.4 +
approval4.2 +

Details

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
the hidden field named "token", with id "token", is defined twice for logged out users - once in forgot_form_top and again in forgot_form_bottom.
(Assignee)

Comment 1

4 years ago
Created attachment 723803 [details] [diff] [review]
patch - v1

untested
Assignee: ui → reed
Status: NEW → ASSIGNED
Attachment #723803 - Flags: review?(glob)
(Reporter)

Comment 2

4 years ago
Comment on attachment 723803 [details] [diff] [review]
patch - v1

if the id attribute is used, this patch would break things.
if the id attribute isn't used, it would be simpler to just remove it from the field rather than renaming it.
Attachment #723803 - Flags: review?(glob) → review-

Comment 3

4 years ago
Comment on attachment 723803 [details] [diff] [review]
patch - v1

No, it should stay, but renamed. Without an ID, you would have no chance to correctly identify this field as you would have several fields with the same name (automated QA tests!). r=LpSolit
Attachment #723803 - Flags: review+

Comment 4

4 years ago
Waiting for glob to withdraw his r-. :)
Depends on: 706271
Flags: approval?
Flags: approval4.4?
Flags: approval4.2?
Target Milestone: --- → Bugzilla 4.2
(Reporter)

Comment 5

4 years ago
Comment on attachment 723803 [details] [diff] [review]
patch - v1

(In reply to Frédéric Buclin from comment #3)
> No, it should stay, but renamed. Without an ID, you would have no chance to
> correctly identify this field as you would have several fields with the same
> name (automated QA tests!). r=LpSolit

this isn't true, you can reference the tokens via the form:
document.getElementById('forgot_form_top')['token']
document.getElementById('forgot_form_bottom')['token']

but if it makes your life easier, and doesn't break existing functionality, i'm happy to withdraw my r-
Attachment #723803 - Flags: review-

Comment 6

4 years ago
(In reply to Byron Jones ‹:glob› from comment #5)
> this isn't true, you can reference the tokens via the form:
> document.getElementById('forgot_form_top')['token']

FYI, our Selenium scripts are written in Perl, not JS. ;) And your code is heavily dependent on the DOM of the page, which makes it rather fragile. That's why I opened bug 317694 and bug 449067 some years ago, to make our life easier when writing automated tests.
Flags: approval?
Flags: approval4.4?
Flags: approval4.4+
Flags: approval4.2?
Flags: approval4.2+
Flags: approval+
(Assignee)

Comment 7

4 years ago
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/
modified template/en/default/account/auth/login-small.html.tmpl
Committed revision 8589.

Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/4.4/
modified template/en/default/account/auth/login-small.html.tmpl
Committed revision 8529.

Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/4.2/
modified template/en/default/account/auth/login-small.html.tmpl
Committed revision 8196.
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.