Closed Bug 364951 Opened 18 years ago Closed 18 years ago

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

Categories

(Bugzilla :: Creating/Changing Bugs, defect)

2.23.3
defect
Not set
minor

Tracking

()

RESOLVED FIXED
Bugzilla 2.22

People

(Reporter: reed, Assigned: reed)

References

Details

Attachments

(2 files, 1 obsolete file)

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.
Attached patch patch - v1 (obsolete) — Splinter Review
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 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-
Attached patch patch - v2Splinter Review
Ok, just set the id instead.
Attachment #249665 - Attachment is obsolete: true
Attachment #249701 - Flags: review?(LpSolit)
Comment on attachment 249701 [details] [diff] [review]
patch - v2

much better. :) r=LpSolit
Attachment #249701 - Flags: review?(LpSolit) → review+
Please fix 2.22 too (also for QA and CC)
Severity: normal → minor
Flags: approval?
Target Milestone: Bugzilla 3.0 → Bugzilla 2.22
Attachment #249703 - Flags: review?(LpSolit)
Comment on attachment 249703 [details] [diff] [review]
patch - v1 (2.22 branch)

r=LpSolit
Attachment #249703 - Flags: review?(LpSolit) → review+
Flags: approval2.22?
Flags: approval?
Flags: approval2.22?
Flags: approval2.22+
Flags: approval+
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
Closed: 18 years ago
Resolution: --- → FIXED
Blocks: 357346
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: