diff options
author | ghendricks%novell.com <> | 2009-02-05 19:40:13 +0100 |
---|---|---|
committer | ghendricks%novell.com <> | 2009-02-05 19:40:13 +0100 |
commit | 9398153efce1f0d32cfcc29363caf0a6aeb98520 (patch) | |
tree | 27dace818c78d5adcc3acb8a6e6916a630995094 | |
parent | 7d01cb036c10487b653fd5a74a64f38093a863c7 (diff) | |
download | bugzilla-9398153efce1f0d32cfcc29363caf0a6aeb98520.tar.gz bugzilla-9398153efce1f0d32cfcc29363caf0a6aeb98520.tar.xz |
Bug 476678 - Rich clients unable to update bugs need security token included in bug xml
patch by ghendricks@novell.com r=LpSolit a=LpSolit
-rwxr-xr-x | importxml.pl | 5 | ||||
-rwxr-xr-x | show_bug.cgi | 2 | ||||
-rw-r--r-- | template/en/default/bug/show.xml.tmpl | 5 |
3 files changed, 11 insertions, 1 deletions
diff --git a/importxml.pl b/importxml.pl index 08bf06c93..a141d5e16 100755 --- a/importxml.pl +++ b/importxml.pl @@ -470,6 +470,11 @@ sub process_bug { # append it to the log, which will go into the comments when we are done. foreach my $bugchild ( $bug->children() ) { Debug( "Parsing field: " . $bugchild->name, DEBUG_LEVEL ); + + # Skip the token if one is included. We don't want it included in + # the comments, and it is not used by the importer. + next if $bugchild->name eq 'token'; + if ( defined $all_fields{ $bugchild->name } ) { my @values = $bug->children_text($bugchild->name); if (scalar @values > 1) { diff --git a/show_bug.cgi b/show_bug.cgi index 0578733be..746167eef 100755 --- a/show_bug.cgi +++ b/show_bug.cgi @@ -117,7 +117,7 @@ $vars->{'bug_list'} = \@bug_list; # on the exclusion list. This is so you can say e.g. "Everything except # attachments" without listing almost all the fields. my @fieldlist = (Bugzilla::Bug->fields, 'group', 'long_desc', - 'attachment', 'attachmentdata'); + 'attachment', 'attachmentdata', 'token'); my %displayfields; if ($cgi->param("field")) { diff --git a/template/en/default/bug/show.xml.tmpl b/template/en/default/bug/show.xml.tmpl index f6f3617a0..1114d9cd7 100644 --- a/template/en/default/bug/show.xml.tmpl +++ b/template/en/default/bug/show.xml.tmpl @@ -48,6 +48,11 @@ [% END %] [% END %] + [%# This is here so automated clients can still use process_bug.cgi %] + [% IF displayfields.token && user.id %] + <token>[% issue_hash_token([bug.id, bug.delta_ts]) FILTER xml %]</token> + [% END %] + [%# Now handle 'special' fields #%] [% IF displayfields.group %] [% FOREACH g = bug.groups %] |