post_bug.cgi does not validate due to invalid id for "Reassign bug to ..." <input>

RESOLVED FIXED in Bugzilla 2.22

Status

()

Bugzilla
Creating/Changing Bugs
--
minor
RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: reed, Assigned: reed)

Tracking

2.23.3
Bugzilla 2.22
Bug Flags:
approval +
approval2.22 +

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Assignee)

Description

11 years ago
post_bug.cgi:
        <input type="radio" id="knob-reassign" name="knob" value="reassign">
        <label for="knob-reassign">
          <a href="page.cgi?id=fields.html#assigned_to">Reassign</a> bug to
        </label><input
  name="assigned_to"
  value="chofmann&#64;gmail.com" onchange="if ((this.value != 'chofmann\x40gmail.com') &amp;&amp; (this.value != '')) {
                               document.changeform.knob[4].checked=true;
                          }"  accesskey="b"  size="32"  id="364450" 
>

show_bug.cgi:
        <input type="radio" id="knob-reassign" name="knob" value="reassign">
        <label for="knob-reassign">
          <a href="page.cgi?id=fields.html#assigned_to">Reassign</a> bug to
        </label><input
  name="assigned_to"
  value="chofmann&#64;gmail.com" onchange="if ((this.value != 'chofmann\x40gmail.com') &amp;&amp; (this.value != '')) {
                               document.changeform.knob[4].checked=true;
                          }"  accesskey="b"  size="32" 
>

Note that post_bug.cgi has an id for the "assigned_to" input. This is invalid. ID and NAME must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods ("."). Most likely, this id should not be showing up in the first place.
(Assignee)

Comment 1

11 years ago
Created attachment 249665 [details] [diff] [review]
patch - v1

The use of the var name "id" was interfering with global/userselect.html.tmpl's use of "id" for an actual id param. I did s/id/bug_id/ to fix the issue.
Assignee: create-and-change → reed
Status: NEW → ASSIGNED
Attachment #249665 - Flags: review?(bugzilla-mozilla)

Comment 2

11 years ago
Comment on attachment 249665 [details] [diff] [review]
patch - v1

>Index: template/en/default/bug/create/created.html.tmpl

>+  # bug_id: number; the ID of the bug that was created.
>   # sentmail: array of hash; bugs for which BugMail should be sent, contains:
>-  #     id: integer; the ID of the bug
>+  #     bug_id: integer; the ID of the bug

Wrong! post_bug.cgi passes $vars->{'id'} to the template, not $vars->{'bug_id'}.
Attachment #249665 - Flags: review?(bugzilla-mozilla) → review-
(Assignee)

Comment 3

11 years ago
Created attachment 249701 [details] [diff] [review]
patch - v2

Ok, just set the id instead.
Attachment #249665 - Attachment is obsolete: true
Attachment #249701 - Flags: review?(LpSolit)

Comment 4

11 years ago
Comment on attachment 249701 [details] [diff] [review]
patch - v2

much better. :) r=LpSolit
Attachment #249701 - Flags: review?(LpSolit) → review+

Comment 5

11 years ago
Please fix 2.22 too (also for QA and CC)
Severity: normal → minor
Flags: approval?
Target Milestone: Bugzilla 3.0 → Bugzilla 2.22
(Assignee)

Comment 6

11 years ago
Created attachment 249703 [details] [diff] [review]
patch - v1 (2.22 branch)
Attachment #249703 - Flags: review?(LpSolit)

Comment 7

11 years ago
Comment on attachment 249703 [details] [diff] [review]
patch - v1 (2.22 branch)

r=LpSolit
Attachment #249703 - Flags: review?(LpSolit) → review+

Updated

11 years ago
Flags: approval2.22?
Flags: approval?
Flags: approval2.22?
Flags: approval2.22+
Flags: approval+

Comment 8

11 years ago
tip:

Checking in template/en/default/bug/knob.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/bug/knob.html.tmpl,v  <--  knob.html.tmpl
new revision: 1.27; previous revision: 1.26
done

2.22.1:

Checking in template/en/default/bug/edit.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/bug/edit.html.tmpl,v  <--  edit.html.tmpl
new revision: 1.69.2.5; previous revision: 1.69.2.4
done
Checking in template/en/default/bug/knob.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/bug/knob.html.tmpl,v  <--  knob.html.tmpl
new revision: 1.19.2.1; previous revision: 1.19
done
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED

Updated

11 years ago
Blocks: 357346
You need to log in before you can comment on or make changes to this bug.