]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 476678 - Rich clients unable to update bugs need security token included in...
authorghendricks%novell.com <>
Thu, 5 Feb 2009 18:38:32 +0000 (18:38 +0000)
committerghendricks%novell.com <>
Thu, 5 Feb 2009 18:38:32 +0000 (18:38 +0000)
 patch by ghendricks@novell.com r=LpSolit a=LpSolit

importxml.pl
show_bug.cgi
template/en/default/bug/show.xml.tmpl

index 6b0c043b4d732957f02d79b8d8e2cea7b8416f88..d24c1ee1c1af10306b860ea8659d5a61b373f2d3 100755 (executable)
@@ -474,6 +474,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) {
index 59e2286c34676a249a6cdc5b9202440aec34670c..2655e5f33e59ba86ae97e1e02d7c3f31c088aa5a 100755 (executable)
@@ -115,7 +115,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")) {
index 23874d989b1535498336b255fdced3f51b78bdf6..bd7459271453afdc0b1186a14a2f176763655027 100644 (file)
         [% 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 %]