]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1426475 - Make unknown bug id / alias error message more obvious to prevent conte...
authorDylan William Hardison <dylan@hardison.net>
Wed, 3 Jan 2018 17:13:10 +0000 (12:13 -0500)
committerDylan William Hardison <dylan@hardison.net>
Thu, 4 Jan 2018 13:13:12 +0000 (08:13 -0500)
template/en/default/global/user-error.html.tmpl

index 9eefbcb73aa714c2ce0bd2eeedd3374d9de1f607..a9342e343dfdd47aeb4442e1f2ac3bd1fceebe41 100644 (file)
     [% title = BLOCK %]
       [% IF bug_id %]Invalid [% ELSE %]Missing [% END %] [% terms.Bug %] ID
     [% END %]
+    [% UNLESS bug_id.match("^\\d+$") %]
+        [% bug_id = bug_id.truncate(40).upper().replace("\\W+", "", "g") %]
+    [% END %]
     [% IF bug_id %]
-      '[% bug_id FILTER html %]' is not a valid [% terms.bug %] number
+      Sorry, I can't find "<em>[% bug_id FILTER html %]</em>".
+      It does not seem like [% terms.bug %] number
       [% IF Param("usebugaliases") %]
         nor an alias to [% terms.abug %]
       [% END %].
    admindocslinks = admindocslinks
 %]
 
+<h1>[% title FILTER html %]</h1>
+
 <table cellpadding="20">
   <tr>
     <td id="error_msg" class="throw_error">