From b75a20aec9c464bfc836a1433979e0cbbb2548d5 Mon Sep 17 00:00:00 2001
From: Per Cederqvist <ceder@lysator.liu.se>
Date: Fri, 11 Jul 2014 09:33:40 +0200
Subject: [PATCH] Imported Bugzilla 2.16.1.

---
 CVS/Entries                                   | 150 +++++++++---------
 CVS/Entries.Log                               |   2 +
 CVS/Tag                                       |   2 +-
 checksetup.pl                                 |   3 +-
 contrib/CVS/Entries                           |  24 +--
 contrib/CVS/Tag                               |   2 +-
 contrib/bug_email.pl                          |   8 +-
 contrib/bugzilla_email_append.pl              |   2 +-
 contrib/cmdline/CVS/Entries                   |   6 +-
 contrib/cmdline/CVS/Tag                       |   2 +-
 createaccount.cgi                             |   1 -
 css/CVS/Entries                               |   4 +-
 css/CVS/Tag                                   |   2 +-
 docs/CVS/Entries                              |   4 +-
 docs/CVS/Tag                                  |   2 +-
 docs/html/CVS/Entries                         |  94 +++++------
 docs/html/CVS/Tag                             |   2 +-
 docs/images/CVS/Entries                       |  12 +-
 docs/images/CVS/Tag                           |   2 +-
 docs/rel_notes.txt                            | 108 +++++++++++--
 docs/sgml/CVS/Entries                         |  34 ++--
 docs/sgml/CVS/Tag                             |   2 +-
 docs/txt/CVS/Entries                          |   2 +-
 docs/txt/CVS/Tag                              |   2 +-
 editproducts.cgi                              |  55 +++++--
 globals.pl                                    |  17 +-
 importxml.pl                                  |   2 +-
 post_bug.cgi                                  |   4 +-
 process_bug.cgi                               |   4 +-
 t/CVS/Entries                                 |  10 +-
 t/CVS/Tag                                     |   2 +-
 t/Support/CVS/Entries                         |   6 +-
 t/Support/CVS/Tag                             |   2 +-
 template/CVS/Entries                          |   2 +-
 template/CVS/Tag                              |   2 +-
 template/en/CVS/Entries                       |   2 +-
 template/en/CVS/Tag                           |   2 +-
 template/en/default/CVS/Entries               |   4 +-
 template/en/default/CVS/Entries.Log           |   4 +
 template/en/default/CVS/Tag                   |   2 +-
 template/en/default/account/CVS/Entries       |   8 +-
 template/en/default/account/CVS/Tag           |   2 +-
 template/en/default/account/email/CVS/Entries |   6 +-
 template/en/default/account/email/CVS/Tag     |   2 +-
 .../en/default/account/password/CVS/Entries   |   4 +-
 template/en/default/account/password/CVS/Tag  |   2 +-
 template/en/default/account/prefs/CVS/Entries |  10 +-
 template/en/default/account/prefs/CVS/Tag     |   2 +-
 .../en/default/account/prefs/prefs.html.tmpl  |  11 +-
 template/en/default/admin/CVS/Entries.Log     |   6 +
 template/en/default/admin/CVS/Tag             |   2 +-
 .../en/default/admin/attachstatus/CVS/Entries |   8 +-
 .../en/default/admin/attachstatus/CVS/Tag     |   2 +-
 template/en/default/attachment/CVS/Entries    |  14 +-
 template/en/default/attachment/CVS/Tag        |   2 +-
 template/en/default/bug/CVS/Entries           |  16 +-
 template/en/default/bug/CVS/Tag               |   2 +-
 template/en/default/bug/activity/CVS/Entries  |   4 +-
 template/en/default/bug/activity/CVS/Tag      |   2 +-
 template/en/default/bug/create/CVS/Entries    |  10 +-
 template/en/default/bug/create/CVS/Tag        |   2 +-
 template/en/default/bug/process/CVS/Entries   |  10 +-
 template/en/default/bug/process/CVS/Tag       |   2 +-
 .../bug/process/confirm-duplicate.html.tmpl   |   1 +
 .../en/default/bug/process/midair.html.tmpl   |   1 +
 .../bug/process/verify-new-product.html.tmpl  |   1 +
 template/en/default/bug/votes/CVS/Entries     |   6 +-
 template/en/default/bug/votes/CVS/Tag         |   2 +-
 template/en/default/global/CVS/Entries        |  20 +--
 template/en/default/global/CVS/Tag            |   2 +-
 .../en/default/global/hidden-fields.html.tmpl |  13 +-
 template/en/default/list/CVS/Entries          |  16 +-
 template/en/default/list/CVS/Tag              |   2 +-
 template/en/default/reports/CVS/Entries       |  10 +-
 template/en/default/reports/CVS/Tag           |   2 +-
 template/en/default/search/CVS/Entries        |   8 +-
 template/en/default/search/CVS/Tag            |   2 +-
 userprefs.cgi                                 |   8 +-
 78 files changed, 491 insertions(+), 324 deletions(-)

diff --git a/CVS/Entries b/CVS/Entries
index f5474f422..f7c69ddb6 100644
--- a/CVS/Entries
+++ b/CVS/Entries
@@ -1,78 +1,78 @@
-/.cvsignore/1.5.2.1/Mon May 13 22:31:47 2002//TBUGZILLA-2_16
-/1x1.gif/1.1/Wed Aug 26 06:14:15 1998/-kb/TBUGZILLA-2_16
-/Attachment.pm/1.8/Sat Mar 23 17:58:36 2002//TBUGZILLA-2_16
-/Bug.pm/1.12/Sat Apr 27 06:25:41 2002//TBUGZILLA-2_16
-/CGI.pl/1.153.2.3/Wed Jul 10 06:27:15 2002//TBUGZILLA-2_16
-/README/1.50/Sat Aug 11 19:56:40 2001//TBUGZILLA-2_16
-/RelationSet.pm/1.7/Sat Nov  3 02:05:43 2001//TBUGZILLA-2_16
-/Token.pm/1.12.2.1/Tue Jul  9 02:17:28 2002//TBUGZILLA-2_16
-/UPGRADING/1.1/Fri Aug 10 22:35:21 2001//TBUGZILLA-2_16
-/UPGRADING-pre-2.8/1.2/Sun Dec 23 23:23:22 2001//TBUGZILLA-2_16
-/ant.jpg/1.2/Wed Aug 26 22:36:05 1998/-kb/TBUGZILLA-2_16
-/attachment.cgi/1.14/Wed Apr 24 07:24:43 2002//TBUGZILLA-2_16
-/bug_form.pl/1.93.2.3/Wed Jul 10 00:05:51 2002//TBUGZILLA-2_16
-/bug_status.html/1.13/Mon Apr 15 02:47:52 2002//TBUGZILLA-2_16
-/buglist.cgi/1.169.2.10/Wed Jun 19 22:53:25 2002//TBUGZILLA-2_16
-/bugwritinghelp.html/1.3/Mon Apr 15 02:47:53 2002//TBUGZILLA-2_16
-/bugzilla.dtd/1.5/Thu Apr  4 04:19:58 2002//TBUGZILLA-2_16
-/changepassword.cgi/1.21/Sun Jan 20 01:44:37 2002//TBUGZILLA-2_16
-/checksetup.pl/1.149.2.10/Fri Jul 19 14:04:08 2002//TBUGZILLA-2_16
-/colchange.cgi/1.24.2.2/Mon Jun 17 09:39:35 2002//TBUGZILLA-2_16
-/collectstats.pl/1.20/Wed Jun  6 21:17:40 2001//TBUGZILLA-2_16
-/confirmhelp.html/1.3/Mon Apr 15 02:47:53 2002//TBUGZILLA-2_16
-/createaccount.cgi/1.21.2.2/Thu Jul 11 19:25:29 2002//TBUGZILLA-2_16
-/defparams.pl/1.73.2.2/Wed Jul 10 00:05:52 2002//TBUGZILLA-2_16
-/describecomponents.cgi/1.11.2.2/Mon Jun 17 09:39:40 2002//TBUGZILLA-2_16
-/describekeywords.cgi/1.8/Wed Apr 24 07:24:45 2002//TBUGZILLA-2_16
-/doeditparams.cgi/1.17.2.1/Mon Jun 17 09:39:40 2002//TBUGZILLA-2_16
-/duplicates.cgi/1.19/Fri Apr 26 23:18:57 2002//TBUGZILLA-2_16
-/editattachstatuses.cgi/1.7/Mon Apr 29 19:32:27 2002//TBUGZILLA-2_16
-/editcomponents.cgi/1.22.2.2/Mon Jun 17 09:39:41 2002//TBUGZILLA-2_16
-/editgroups.cgi/1.16.2.1/Mon Jun 17 09:39:41 2002//TBUGZILLA-2_16
-/editkeywords.cgi/1.9.2.1/Mon Jun 17 09:39:42 2002//TBUGZILLA-2_16
-/editmilestones.cgi/1.8.2.1/Mon Jun 17 09:39:42 2002//TBUGZILLA-2_16
-/editparams.cgi/1.14.2.1/Mon Jun 17 09:39:42 2002//TBUGZILLA-2_16
-/editproducts.cgi/1.24.2.1/Mon Jun 17 09:39:42 2002//TBUGZILLA-2_16
-/editusers.cgi/1.35.2.2/Mon Jun 17 09:39:44 2002//TBUGZILLA-2_16
-/editversions.cgi/1.11.2.1/Mon Jun 17 09:39:44 2002//TBUGZILLA-2_16
-/enter_bug.cgi/1.66.2.3/Tue Jun 11 13:33:45 2002//TBUGZILLA-2_16
-/globals.pl/1.169.2.9/Sun Jul 28 00:54:28 2002//TBUGZILLA-2_16
-/help.html/1.5/Mon Apr 15 02:47:55 2002//TBUGZILLA-2_16
-/helpemailquery.html/1.2/Mon Apr 15 02:47:55 2002//TBUGZILLA-2_16
-/how_to_mail.html/1.3/Mon Apr 15 02:47:55 2002//TBUGZILLA-2_16
-/importxml.pl/1.23/Sun Apr  7 03:56:46 2002//TBUGZILLA-2_16
-/index.cgi/1.4.2.1/Sun Jun 23 17:36:00 2002//TBUGZILLA-2_16
-/localconfig.js/1.1/Wed Feb 28 23:07:25 2001//TBUGZILLA-2_16
-/long_list.cgi/1.26/Wed Apr 24 07:24:46 2002//TBUGZILLA-2_16
-/move.pl/1.11.2.1/Mon Jun 17 09:39:48 2002//TBUGZILLA-2_16
-/notargetmilestone.html/1.3/Mon Apr 15 02:47:55 2002//TBUGZILLA-2_16
-/post_bug.cgi/1.52.2.5/Wed Jun 26 12:17:25 2002//TBUGZILLA-2_16
-/process_bug.cgi/1.125.2.5/Fri Jul 19 14:04:10 2002//TBUGZILLA-2_16
-/processmail/1.81/Sun Apr 14 04:43:55 2002//TBUGZILLA-2_16
-/query.cgi/1.98.2.1/Mon Jun  3 01:42:15 2002//TBUGZILLA-2_16
-/queryhelp.cgi/1.11.2.2/Mon Jun 17 09:39:45 2002//TBUGZILLA-2_16
-/quicksearch.html/1.3/Mon Apr 15 02:47:55 2002//TBUGZILLA-2_16
-/quicksearch.js/1.9/Mon Dec 24 22:24:35 2001//TBUGZILLA-2_16
-/quicksearchhack.html/1.4/Mon Apr 15 02:47:55 2002//TBUGZILLA-2_16
-/quips.cgi/1.6.2.1/Mon Jun 17 09:39:46 2002//TBUGZILLA-2_16
-/relogin.cgi/1.18/Wed May  8 04:40:35 2002//TBUGZILLA-2_16
-/reports.cgi/1.54/Fri Apr 26 21:09:50 2002//TBUGZILLA-2_16
-/robots.txt/1.2/Wed Apr 24 18:11:00 2002//TBUGZILLA-2_16
-/runtests.sh/1.5/Fri Apr 12 21:15:45 2002//TBUGZILLA-2_16
-/sanitycheck.cgi/1.42/Thu Apr  4 04:19:58 2002//TBUGZILLA-2_16
-/show_activity.cgi/1.9/Wed Apr 24 07:24:49 2002//TBUGZILLA-2_16
-/show_bug.cgi/1.18/Sat Mar 23 17:58:36 2002//TBUGZILLA-2_16
-/showattachment.cgi/1.10/Wed Jan 30 14:14:12 2002//TBUGZILLA-2_16
-/showdependencygraph.cgi/1.18.2.1/Tue Jul  9 23:40:41 2002//TBUGZILLA-2_16
-/showdependencytree.cgi/1.17.2.1/Tue May 21 14:18:00 2002//TBUGZILLA-2_16
-/sidebar.cgi/1.4.2.2/Wed Jul 10 00:05:54 2002//TBUGZILLA-2_16
-/syncshadowdb/1.14/Sun Dec 23 23:23:22 2001//TBUGZILLA-2_16
-/token.cgi/1.7.2.1/Mon Jun 17 09:39:46 2002//TBUGZILLA-2_16
-/userprefs.cgi/1.35.2.1/Mon Jun 17 09:39:47 2002//TBUGZILLA-2_16
-/votehelp.html/1.10/Mon Apr 15 02:47:56 2002//TBUGZILLA-2_16
-/votes.cgi/1.3/Tue May  7 21:28:41 2002//TBUGZILLA-2_16
-/whineatnews.pl/1.7/Sun Feb 17 08:22:31 2002//TBUGZILLA-2_16
-/xml.cgi/1.6.2.1/Mon Jun 17 09:39:48 2002//TBUGZILLA-2_16
+/.cvsignore/1.5.2.1/Mon May 13 22:31:47 2002//TBUGZILLA-2_16_1
+/1x1.gif/1.1/Wed Aug 26 06:14:15 1998/-kb/TBUGZILLA-2_16_1
+/Attachment.pm/1.8/Sat Mar 23 17:58:36 2002//TBUGZILLA-2_16_1
+/Bug.pm/1.12/Sat Apr 27 06:25:41 2002//TBUGZILLA-2_16_1
+/CGI.pl/1.153.2.3/Wed Jul 10 06:27:15 2002//TBUGZILLA-2_16_1
+/README/1.50/Sat Aug 11 19:56:40 2001//TBUGZILLA-2_16_1
+/RelationSet.pm/1.7/Sat Nov  3 02:05:43 2001//TBUGZILLA-2_16_1
+/Token.pm/1.12.2.1/Tue Jul  9 02:17:28 2002//TBUGZILLA-2_16_1
+/UPGRADING/1.1/Fri Aug 10 22:35:21 2001//TBUGZILLA-2_16_1
+/UPGRADING-pre-2.8/1.2/Sun Dec 23 23:23:22 2001//TBUGZILLA-2_16_1
+/ant.jpg/1.2/Wed Aug 26 22:36:05 1998/-kb/TBUGZILLA-2_16_1
+/attachment.cgi/1.14/Wed Apr 24 07:24:43 2002//TBUGZILLA-2_16_1
+/bug_form.pl/1.93.2.3/Wed Jul 10 00:05:51 2002//TBUGZILLA-2_16_1
+/bug_status.html/1.13/Mon Apr 15 02:47:52 2002//TBUGZILLA-2_16_1
+/buglist.cgi/1.169.2.10/Wed Jun 19 22:53:25 2002//TBUGZILLA-2_16_1
+/bugwritinghelp.html/1.3/Mon Apr 15 02:47:53 2002//TBUGZILLA-2_16_1
+/bugzilla.dtd/1.5/Thu Apr  4 04:19:58 2002//TBUGZILLA-2_16_1
+/changepassword.cgi/1.21/Sun Jan 20 01:44:37 2002//TBUGZILLA-2_16_1
+/checksetup.pl/1.149.2.11/Wed Aug 14 23:32:04 2002//TBUGZILLA-2_16_1
+/colchange.cgi/1.24.2.2/Mon Jun 17 09:39:35 2002//TBUGZILLA-2_16_1
+/collectstats.pl/1.20/Wed Jun  6 21:17:40 2001//TBUGZILLA-2_16_1
+/confirmhelp.html/1.3/Mon Apr 15 02:47:53 2002//TBUGZILLA-2_16_1
+/createaccount.cgi/1.21.2.3/Fri Aug 30 15:29:24 2002//TBUGZILLA-2_16_1
+/defparams.pl/1.73.2.2/Wed Jul 10 00:05:52 2002//TBUGZILLA-2_16_1
+/describecomponents.cgi/1.11.2.2/Mon Jun 17 09:39:40 2002//TBUGZILLA-2_16_1
+/describekeywords.cgi/1.8/Wed Apr 24 07:24:45 2002//TBUGZILLA-2_16_1
+/doeditparams.cgi/1.17.2.1/Mon Jun 17 09:39:40 2002//TBUGZILLA-2_16_1
+/duplicates.cgi/1.19/Fri Apr 26 23:18:57 2002//TBUGZILLA-2_16_1
+/editattachstatuses.cgi/1.7/Mon Apr 29 19:32:27 2002//TBUGZILLA-2_16_1
+/editcomponents.cgi/1.22.2.2/Mon Jun 17 09:39:41 2002//TBUGZILLA-2_16_1
+/editgroups.cgi/1.16.2.1/Mon Jun 17 09:39:41 2002//TBUGZILLA-2_16_1
+/editkeywords.cgi/1.9.2.1/Mon Jun 17 09:39:42 2002//TBUGZILLA-2_16_1
+/editmilestones.cgi/1.8.2.1/Mon Jun 17 09:39:42 2002//TBUGZILLA-2_16_1
+/editparams.cgi/1.14.2.1/Mon Jun 17 09:39:42 2002//TBUGZILLA-2_16_1
+/editproducts.cgi/1.24.2.2/Sun Sep 22 17:47:12 2002//TBUGZILLA-2_16_1
+/editusers.cgi/1.35.2.2/Mon Jun 17 09:39:44 2002//TBUGZILLA-2_16_1
+/editversions.cgi/1.11.2.1/Mon Jun 17 09:39:44 2002//TBUGZILLA-2_16_1
+/enter_bug.cgi/1.66.2.3/Tue Jun 11 13:33:45 2002//TBUGZILLA-2_16_1
+/globals.pl/1.169.2.12/Sat Sep 28 23:54:50 2002//TBUGZILLA-2_16_1
+/help.html/1.5/Mon Apr 15 02:47:55 2002//TBUGZILLA-2_16_1
+/helpemailquery.html/1.2/Mon Apr 15 02:47:55 2002//TBUGZILLA-2_16_1
+/how_to_mail.html/1.3/Mon Apr 15 02:47:55 2002//TBUGZILLA-2_16_1
+/importxml.pl/1.23.2.1/Sun Aug 25 16:50:08 2002//TBUGZILLA-2_16_1
+/index.cgi/1.4.2.1/Sun Jun 23 17:36:00 2002//TBUGZILLA-2_16_1
+/localconfig.js/1.1/Wed Feb 28 23:07:25 2001//TBUGZILLA-2_16_1
+/long_list.cgi/1.26/Wed Apr 24 07:24:46 2002//TBUGZILLA-2_16_1
+/move.pl/1.11.2.1/Mon Jun 17 09:39:48 2002//TBUGZILLA-2_16_1
+/notargetmilestone.html/1.3/Mon Apr 15 02:47:55 2002//TBUGZILLA-2_16_1
+/post_bug.cgi/1.52.2.6/Thu Aug  1 09:59:32 2002//TBUGZILLA-2_16_1
+/process_bug.cgi/1.125.2.6/Tue Sep  3 07:24:54 2002//TBUGZILLA-2_16_1
+/processmail/1.81/Sun Apr 14 04:43:55 2002//TBUGZILLA-2_16_1
+/query.cgi/1.98.2.1/Mon Jun  3 01:42:15 2002//TBUGZILLA-2_16_1
+/queryhelp.cgi/1.11.2.2/Mon Jun 17 09:39:45 2002//TBUGZILLA-2_16_1
+/quicksearch.html/1.3/Mon Apr 15 02:47:55 2002//TBUGZILLA-2_16_1
+/quicksearch.js/1.9/Mon Dec 24 22:24:35 2001//TBUGZILLA-2_16_1
+/quicksearchhack.html/1.4/Mon Apr 15 02:47:55 2002//TBUGZILLA-2_16_1
+/quips.cgi/1.6.2.1/Mon Jun 17 09:39:46 2002//TBUGZILLA-2_16_1
+/relogin.cgi/1.18/Wed May  8 04:40:35 2002//TBUGZILLA-2_16_1
+/reports.cgi/1.54/Fri Apr 26 21:09:50 2002//TBUGZILLA-2_16_1
+/robots.txt/1.2/Wed Apr 24 18:11:00 2002//TBUGZILLA-2_16_1
+/runtests.sh/1.5/Fri Apr 12 21:15:45 2002//TBUGZILLA-2_16_1
+/sanitycheck.cgi/1.42/Thu Apr  4 04:19:58 2002//TBUGZILLA-2_16_1
+/show_activity.cgi/1.9/Wed Apr 24 07:24:49 2002//TBUGZILLA-2_16_1
+/show_bug.cgi/1.18/Sat Mar 23 17:58:36 2002//TBUGZILLA-2_16_1
+/showattachment.cgi/1.10/Wed Jan 30 14:14:12 2002//TBUGZILLA-2_16_1
+/showdependencygraph.cgi/1.18.2.1/Tue Jul  9 23:40:41 2002//TBUGZILLA-2_16_1
+/showdependencytree.cgi/1.17.2.1/Tue May 21 14:18:00 2002//TBUGZILLA-2_16_1
+/sidebar.cgi/1.4.2.2/Wed Jul 10 00:05:54 2002//TBUGZILLA-2_16_1
+/syncshadowdb/1.14/Sun Dec 23 23:23:22 2001//TBUGZILLA-2_16_1
+/token.cgi/1.7.2.1/Mon Jun 17 09:39:46 2002//TBUGZILLA-2_16_1
+/userprefs.cgi/1.35.2.3/Tue Aug 13 06:57:00 2002//TBUGZILLA-2_16_1
+/votehelp.html/1.10/Mon Apr 15 02:47:56 2002//TBUGZILLA-2_16_1
+/votes.cgi/1.3/Tue May  7 21:28:41 2002//TBUGZILLA-2_16_1
+/whineatnews.pl/1.7/Sun Feb 17 08:22:31 2002//TBUGZILLA-2_16_1
+/xml.cgi/1.6.2.1/Mon Jun 17 09:39:48 2002//TBUGZILLA-2_16_1
 D/contrib////
 D/css////
 D/docs////
diff --git a/CVS/Entries.Log b/CVS/Entries.Log
index 9e28d4fb7..7bc9f41d7 100644
--- a/CVS/Entries.Log
+++ b/CVS/Entries.Log
@@ -1,4 +1,6 @@
+A D/Bugzilla////
 A D/Conf////
 A D/oracle////
 R D/oracle////
 R D/Conf////
+R D/Bugzilla////
diff --git a/CVS/Tag b/CVS/Tag
index f2ec6389c..a82894094 100644
--- a/CVS/Tag
+++ b/CVS/Tag
@@ -1 +1 @@
-NBUGZILLA-2_16
+NBUGZILLA-2_16_1
diff --git a/checksetup.pl b/checksetup.pl
index 8c5b7ea1f..4d3c1e158 100755
--- a/checksetup.pl
+++ b/checksetup.pl
@@ -2722,7 +2722,8 @@ if (!($sth->fetchrow_arrayref()->[0])) {
 
         foreach $key (keys(%dupes))
         {
-                $dupes{$key} =~ s/.*\*\*\* This bug has been marked as a duplicate of (\d{1,5}) \*\*\*.*?/$1/sm;
+                $dupes{$key} =~ /^.*\*\*\* This bug has been marked as a duplicate of (\d+) \*\*\*$/ms;
+                $dupes{$key} = $1;
                 $dbh->do("INSERT INTO duplicates VALUES('$dupes{$key}', '$key')");
                 #                                        BugItsADupeOf   Dupe
         }
diff --git a/contrib/CVS/Entries b/contrib/CVS/Entries
index 6b54b7eb4..c11c48df0 100644
--- a/contrib/CVS/Entries
+++ b/contrib/CVS/Entries
@@ -1,13 +1,13 @@
-/BugzillaEmail.pm/1.1/Wed Mar 15 22:29:44 2000//TBUGZILLA-2_16
-/README/1.4/Sun Apr 22 18:13:40 2001//TBUGZILLA-2_16
-/README.Mailif/1.3/Wed Mar 15 23:39:03 2000//TBUGZILLA-2_16
-/bug_email.pl/1.9.12.1/Thu Jul 25 01:47:33 2002//TBUGZILLA-2_16
-/bugmail_help.html/1.1/Tue Mar  7 17:36:48 2000//TBUGZILLA-2_16
-/bugzilla.procmailrc/1.1/Wed Mar 15 23:39:09 2000//TBUGZILLA-2_16
-/bugzilla_email_append.pl/1.2.14.1/Thu Jul 25 01:47:34 2002//TBUGZILLA-2_16
-/cvs-update.sh/1.1/Wed Apr 18 18:01:28 2001//TBUGZILLA-2_16
-/gnats2bz.pl/1.6/Thu Jan 31 14:29:21 2002//TBUGZILLA-2_16
-/jb2bz.py/1.1/Wed Feb 13 14:59:30 2002//TBUGZILLA-2_16
-/mysqld-watcher.pl/1.2/Fri Jun  1 08:34:45 2001//TBUGZILLA-2_16
-/yp_nomail.sh/1.1/Tue Sep 12 23:50:31 2000//TBUGZILLA-2_16
+/BugzillaEmail.pm/1.1/Wed Mar 15 22:29:44 2000//TBUGZILLA-2_16_1
+/README/1.4/Sun Apr 22 18:13:40 2001//TBUGZILLA-2_16_1
+/README.Mailif/1.3/Wed Mar 15 23:39:03 2000//TBUGZILLA-2_16_1
+/bug_email.pl/1.9.12.2/Sat Aug 17 14:24:09 2002//TBUGZILLA-2_16_1
+/bugmail_help.html/1.1/Tue Mar  7 17:36:48 2000//TBUGZILLA-2_16_1
+/bugzilla.procmailrc/1.1/Wed Mar 15 23:39:09 2000//TBUGZILLA-2_16_1
+/bugzilla_email_append.pl/1.2.14.2/Tue Sep  3 06:39:06 2002//TBUGZILLA-2_16_1
+/cvs-update.sh/1.1/Wed Apr 18 18:01:28 2001//TBUGZILLA-2_16_1
+/gnats2bz.pl/1.6/Thu Jan 31 14:29:21 2002//TBUGZILLA-2_16_1
+/jb2bz.py/1.1/Wed Feb 13 14:59:30 2002//TBUGZILLA-2_16_1
+/mysqld-watcher.pl/1.2/Fri Jun  1 08:34:45 2001//TBUGZILLA-2_16_1
+/yp_nomail.sh/1.1/Tue Sep 12 23:50:31 2000//TBUGZILLA-2_16_1
 D/cmdline////
diff --git a/contrib/CVS/Tag b/contrib/CVS/Tag
index f2ec6389c..a82894094 100644
--- a/contrib/CVS/Tag
+++ b/contrib/CVS/Tag
@@ -1 +1 @@
-NBUGZILLA-2_16
+NBUGZILLA-2_16_1
diff --git a/contrib/bug_email.pl b/contrib/bug_email.pl
index 18e8bb3c6..9a3d0da0b 100755
--- a/contrib/bug_email.pl
+++ b/contrib/bug_email.pl
@@ -37,7 +37,7 @@
 #
 # You need to work with bug_email.pl the MIME::Parser installed.
 # 
-# $Id: bug_email.pl,v 1.9.12.1 2002/07/25 01:47:33 justdave%syndicomm.com Exp $
+# $Id: bug_email.pl,v 1.9.12.2 2002/08/17 14:24:09 bbaetz%student.usyd.edu.au Exp $
 ###############################################################
 
 # 02/12/2000 (SML)
@@ -1236,13 +1236,7 @@ END
 	SendSQL($long_desc_query);
 
 	# Cool, the mail was successful
-        # chdir back to the main directory which has the processmail script
-        # Oh, for a processmail module....
-        use Cwd;
-        my $old_cwd = getcwd();
-        chdir("..");
         system("./processmail", $id, $SenderShort);
-        chdir($old_cwd);
     } else {
 	$id = 0xFFFF;  # TEST !
 	print "\n-------------------------------------------------------------------------\n";
diff --git a/contrib/bugzilla_email_append.pl b/contrib/bugzilla_email_append.pl
index 826b49198..5fbd00824 100755
--- a/contrib/bugzilla_email_append.pl
+++ b/contrib/bugzilla_email_append.pl
@@ -117,7 +117,7 @@ my $Body = "Subject: " . $Subject . "\n" . $Comment;
 my $long_desc_query = "INSERT INTO longdescs SET bug_id=$found_id, who=$userid, bug_when=NOW(), thetext=" . SqlQuote($Body) . ";";
 SendSQL($long_desc_query);
 
-system("cd .. ; ./processmail $found_id '$SenderShort'");
+system("./processmail", $found_id, $SenderShort);
 
 sub DealWithError {
   my ($reason) = @_;
diff --git a/contrib/cmdline/CVS/Entries b/contrib/cmdline/CVS/Entries
index f5df070d4..c73401aaf 100644
--- a/contrib/cmdline/CVS/Entries
+++ b/contrib/cmdline/CVS/Entries
@@ -1,4 +1,4 @@
-/buglist/1.1/Thu Nov 15 17:04:58 2001//TBUGZILLA-2_16
-/bugs/1.1/Thu Nov 15 17:04:58 2001//TBUGZILLA-2_16
-/query.conf/1.1/Thu Nov 15 17:04:58 2001//TBUGZILLA-2_16
+/buglist/1.1/Thu Nov 15 17:04:58 2001//TBUGZILLA-2_16_1
+/bugs/1.1/Thu Nov 15 17:04:58 2001//TBUGZILLA-2_16_1
+/query.conf/1.1/Thu Nov 15 17:04:58 2001//TBUGZILLA-2_16_1
 D
diff --git a/contrib/cmdline/CVS/Tag b/contrib/cmdline/CVS/Tag
index f2ec6389c..a82894094 100644
--- a/contrib/cmdline/CVS/Tag
+++ b/contrib/cmdline/CVS/Tag
@@ -1 +1 @@
-NBUGZILLA-2_16
+NBUGZILLA-2_16_1
diff --git a/createaccount.cgi b/createaccount.cgi
index 8a5b85782..e409f28b8 100755
--- a/createaccount.cgi
+++ b/createaccount.cgi
@@ -66,7 +66,6 @@ if (defined($login)) {
     # We've been asked to create an account.
     my $realname = trim($::FORM{'realname'});
     CheckEmailSyntax($login);
-    trick_taint($login);
     $vars->{'login'} = $login;
     
     if (!ValidateNewUser($login)) {
diff --git a/css/CVS/Entries b/css/CVS/Entries
index 900e6ccdf..224a83e0c 100644
--- a/css/CVS/Entries
+++ b/css/CVS/Entries
@@ -1,3 +1,3 @@
-/buglist.css/1.1/Tue Mar 12 13:55:00 2002//TBUGZILLA-2_16
-/panel.css/1.1/Wed Dec 12 22:41:11 2001//TBUGZILLA-2_16
+/buglist.css/1.1/Tue Mar 12 13:55:00 2002//TBUGZILLA-2_16_1
+/panel.css/1.1/Wed Dec 12 22:41:11 2001//TBUGZILLA-2_16_1
 D
diff --git a/css/CVS/Tag b/css/CVS/Tag
index f2ec6389c..a82894094 100644
--- a/css/CVS/Tag
+++ b/css/CVS/Tag
@@ -1 +1 @@
-NBUGZILLA-2_16
+NBUGZILLA-2_16_1
diff --git a/docs/CVS/Entries b/docs/CVS/Entries
index 3effe51fa..9c867c3a7 100644
--- a/docs/CVS/Entries
+++ b/docs/CVS/Entries
@@ -1,5 +1,5 @@
-/README.docs/1.6/Wed May  1 09:24:40 2002//TBUGZILLA-2_16
-/rel_notes.txt/1.10.2.10/Sat Jul 27 22:30:20 2002//TBUGZILLA-2_16
+/README.docs/1.6/Wed May  1 09:24:40 2002//TBUGZILLA-2_16_1
+/rel_notes.txt/1.10.2.11/Sun Sep 29 05:24:53 2002//TBUGZILLA-2_16_1
 D/html////
 D/images////
 D/sgml////
diff --git a/docs/CVS/Tag b/docs/CVS/Tag
index f2ec6389c..a82894094 100644
--- a/docs/CVS/Tag
+++ b/docs/CVS/Tag
@@ -1 +1 @@
-NBUGZILLA-2_16
+NBUGZILLA-2_16_1
diff --git a/docs/html/CVS/Entries b/docs/html/CVS/Entries
index 6a7291459..992b4d7d5 100644
--- a/docs/html/CVS/Entries
+++ b/docs/html/CVS/Entries
@@ -1,48 +1,48 @@
-/Bugzilla-Guide.html/1.15.2.1/Thu Jul 25 21:03:10 2002//TBUGZILLA-2_16
-/about.html/1.7.2.1/Sat May 11 17:59:49 2002//TBUGZILLA-2_16
-/aboutthisguide.html/1.9/Wed May  8 21:16:36 2002//TBUGZILLA-2_16
-/administration.html/1.7.2.5/Thu Jul 25 20:48:28 2002//TBUGZILLA-2_16
-/cmdline.html/1.7.2.3/Sat May 25 15:36:47 2002//TBUGZILLA-2_16
-/conventions.html/1.8.2.4/Thu Jul 25 20:48:29 2002//TBUGZILLA-2_16
-/copyright.html/1.9.2.3/Thu Jul 25 20:48:29 2002//TBUGZILLA-2_16
-/credits.html/1.8.2.1/Sat May 11 17:59:52 2002//TBUGZILLA-2_16
-/cust-templates.html/1.1.2.5/Thu Jul 25 21:03:13 2002//TBUGZILLA-2_16
-/database.html/1.6.2.3/Sat May 25 15:36:47 2002//TBUGZILLA-2_16
-/dbdoc.html/1.9.2.5/Thu Jul 25 20:48:30 2002//TBUGZILLA-2_16
-/dbschema.html/1.7.2.1/Sun May 12 16:15:16 2002//TBUGZILLA-2_16
-/disclaimer.html/1.7.2.1/Sat May 11 17:59:54 2002//TBUGZILLA-2_16
-/extraconfig.html/1.1.2.4/Thu Jul 25 20:48:30 2002//TBUGZILLA-2_16
-/faq.html/1.10.2.5/Thu Jul 25 20:48:30 2002//TBUGZILLA-2_16
-/glossary.html/1.11.2.5/Thu Jul 25 20:48:32 2002//TBUGZILLA-2_16
-/groups.html/1.1.2.2/Sat May 25 15:36:51 2002//TBUGZILLA-2_16
-/hintsandtips.html/1.1.2.3/Sat Jul 13 07:54:03 2002//TBUGZILLA-2_16
-/how.html/1.10.2.4/Thu Jul 25 20:48:33 2002//TBUGZILLA-2_16
-/index.html/1.11.2.5/Thu Jul 25 20:48:33 2002//TBUGZILLA-2_16
-/installation.html/1.10.2.5/Thu Jul 25 20:48:33 2002//TBUGZILLA-2_16
-/integration.html/1.7.2.3/Sat May 25 15:36:54 2002//TBUGZILLA-2_16
-/introduction.html/1.1.2.1/Sun May 12 16:17:40 2002//TBUGZILLA-2_16
-/newversions.html/1.8.2.1/Sat May 11 18:00:00 2002//TBUGZILLA-2_16
-/osx.html/1.3.2.3/Sat May 25 15:36:54 2002//TBUGZILLA-2_16
-/parameters.html/1.1.2.1/Sat May 25 15:39:13 2002//TBUGZILLA-2_16
-/patches.html/1.10.2.3/Sat May 25 15:36:54 2002//TBUGZILLA-2_16
-/programadmin.html/1.10.2.3/Sat May 25 15:36:55 2002//TBUGZILLA-2_16
-/rewrite.html/1.3.2.2/Sun May 12 16:15:22 2002//TBUGZILLA-2_16
-/rhbugzilla.html/1.8.2.3/Thu Jul 25 20:48:34 2002//TBUGZILLA-2_16
-/security.html/1.9.2.3/Sat May 25 15:36:55 2002//TBUGZILLA-2_16
-/stepbystep.html/1.8.2.5/Sat Jul 13 07:54:05 2002//TBUGZILLA-2_16
-/troubleshooting.html/1.1.2.4/Thu Jul 25 20:48:35 2002//TBUGZILLA-2_16
-/upgrading.html/1.1.2.2/Sat Jul 13 07:54:06 2002//TBUGZILLA-2_16
-/useradmin.html/1.8.2.2/Sat May 25 15:36:57 2002//TBUGZILLA-2_16
-/userpreferences.html/1.1.2.2/Sat May 25 15:36:57 2002//TBUGZILLA-2_16
-/using.html/1.8.2.4/Sat Jul 13 07:54:06 2002//TBUGZILLA-2_16
-/variant-fenris.html/1.3.2.2/Sun May 12 16:15:24 2002//TBUGZILLA-2_16
-/variant-issuezilla.html/1.3.2.2/Sun May 12 16:15:24 2002//TBUGZILLA-2_16
-/variant-perforce.html/1.3.2.3/Sat May 25 15:36:58 2002//TBUGZILLA-2_16
-/variant-scarab.html/1.3.2.3/Thu Jul 25 20:48:35 2002//TBUGZILLA-2_16
-/variant-sourceforge.html/1.3.2.2/Sun May 12 16:15:25 2002//TBUGZILLA-2_16
-/variants.html/1.8.2.2/Sun May 12 16:15:25 2002//TBUGZILLA-2_16
-/voting.html/1.1.2.2/Sat May 25 15:36:58 2002//TBUGZILLA-2_16
-/whatis.html/1.8.2.1/Sat May 11 18:00:07 2002//TBUGZILLA-2_16
-/why.html/1.7.2.2/Thu Jul 25 20:48:35 2002//TBUGZILLA-2_16
-/win32.html/1.7.2.5/Thu Jul 25 20:48:36 2002//TBUGZILLA-2_16
+/Bugzilla-Guide.html/1.15.2.1/Thu Jul 25 21:03:10 2002//TBUGZILLA-2_16_1
+/about.html/1.7.2.1/Sat May 11 17:59:49 2002//TBUGZILLA-2_16_1
+/aboutthisguide.html/1.9/Wed May  8 21:16:36 2002//TBUGZILLA-2_16_1
+/administration.html/1.7.2.5/Thu Jul 25 20:48:28 2002//TBUGZILLA-2_16_1
+/cmdline.html/1.7.2.3/Sat May 25 15:36:47 2002//TBUGZILLA-2_16_1
+/conventions.html/1.8.2.4/Thu Jul 25 20:48:29 2002//TBUGZILLA-2_16_1
+/copyright.html/1.9.2.3/Thu Jul 25 20:48:29 2002//TBUGZILLA-2_16_1
+/credits.html/1.8.2.1/Sat May 11 17:59:52 2002//TBUGZILLA-2_16_1
+/cust-templates.html/1.1.2.5/Thu Jul 25 21:03:13 2002//TBUGZILLA-2_16_1
+/database.html/1.6.2.3/Sat May 25 15:36:47 2002//TBUGZILLA-2_16_1
+/dbdoc.html/1.9.2.5/Thu Jul 25 20:48:30 2002//TBUGZILLA-2_16_1
+/dbschema.html/1.7.2.1/Sun May 12 16:15:16 2002//TBUGZILLA-2_16_1
+/disclaimer.html/1.7.2.1/Sat May 11 17:59:54 2002//TBUGZILLA-2_16_1
+/extraconfig.html/1.1.2.4/Thu Jul 25 20:48:30 2002//TBUGZILLA-2_16_1
+/faq.html/1.10.2.5/Thu Jul 25 20:48:30 2002//TBUGZILLA-2_16_1
+/glossary.html/1.11.2.5/Thu Jul 25 20:48:32 2002//TBUGZILLA-2_16_1
+/groups.html/1.1.2.2/Sat May 25 15:36:51 2002//TBUGZILLA-2_16_1
+/hintsandtips.html/1.1.2.3/Sat Jul 13 07:54:03 2002//TBUGZILLA-2_16_1
+/how.html/1.10.2.4/Thu Jul 25 20:48:33 2002//TBUGZILLA-2_16_1
+/index.html/1.11.2.5/Thu Jul 25 20:48:33 2002//TBUGZILLA-2_16_1
+/installation.html/1.10.2.5/Thu Jul 25 20:48:33 2002//TBUGZILLA-2_16_1
+/integration.html/1.7.2.3/Sat May 25 15:36:54 2002//TBUGZILLA-2_16_1
+/introduction.html/1.1.2.1/Sun May 12 16:17:40 2002//TBUGZILLA-2_16_1
+/newversions.html/1.8.2.1/Sat May 11 18:00:00 2002//TBUGZILLA-2_16_1
+/osx.html/1.3.2.3/Sat May 25 15:36:54 2002//TBUGZILLA-2_16_1
+/parameters.html/1.1.2.1/Sat May 25 15:39:13 2002//TBUGZILLA-2_16_1
+/patches.html/1.10.2.3/Sat May 25 15:36:54 2002//TBUGZILLA-2_16_1
+/programadmin.html/1.10.2.3/Sat May 25 15:36:55 2002//TBUGZILLA-2_16_1
+/rewrite.html/1.3.2.2/Sun May 12 16:15:22 2002//TBUGZILLA-2_16_1
+/rhbugzilla.html/1.8.2.3/Thu Jul 25 20:48:34 2002//TBUGZILLA-2_16_1
+/security.html/1.9.2.3/Sat May 25 15:36:55 2002//TBUGZILLA-2_16_1
+/stepbystep.html/1.8.2.5/Sat Jul 13 07:54:05 2002//TBUGZILLA-2_16_1
+/troubleshooting.html/1.1.2.4/Thu Jul 25 20:48:35 2002//TBUGZILLA-2_16_1
+/upgrading.html/1.1.2.2/Sat Jul 13 07:54:06 2002//TBUGZILLA-2_16_1
+/useradmin.html/1.8.2.2/Sat May 25 15:36:57 2002//TBUGZILLA-2_16_1
+/userpreferences.html/1.1.2.2/Sat May 25 15:36:57 2002//TBUGZILLA-2_16_1
+/using.html/1.8.2.4/Sat Jul 13 07:54:06 2002//TBUGZILLA-2_16_1
+/variant-fenris.html/1.3.2.2/Sun May 12 16:15:24 2002//TBUGZILLA-2_16_1
+/variant-issuezilla.html/1.3.2.2/Sun May 12 16:15:24 2002//TBUGZILLA-2_16_1
+/variant-perforce.html/1.3.2.3/Sat May 25 15:36:58 2002//TBUGZILLA-2_16_1
+/variant-scarab.html/1.3.2.3/Thu Jul 25 20:48:35 2002//TBUGZILLA-2_16_1
+/variant-sourceforge.html/1.3.2.2/Sun May 12 16:15:25 2002//TBUGZILLA-2_16_1
+/variants.html/1.8.2.2/Sun May 12 16:15:25 2002//TBUGZILLA-2_16_1
+/voting.html/1.1.2.2/Sat May 25 15:36:58 2002//TBUGZILLA-2_16_1
+/whatis.html/1.8.2.1/Sat May 11 18:00:07 2002//TBUGZILLA-2_16_1
+/why.html/1.7.2.2/Thu Jul 25 20:48:35 2002//TBUGZILLA-2_16_1
+/win32.html/1.7.2.5/Thu Jul 25 20:48:36 2002//TBUGZILLA-2_16_1
 D
diff --git a/docs/html/CVS/Tag b/docs/html/CVS/Tag
index f2ec6389c..a82894094 100644
--- a/docs/html/CVS/Tag
+++ b/docs/html/CVS/Tag
@@ -1 +1 @@
-NBUGZILLA-2_16
+NBUGZILLA-2_16_1
diff --git a/docs/images/CVS/Entries b/docs/images/CVS/Entries
index 0a580a42c..09be89d73 100644
--- a/docs/images/CVS/Entries
+++ b/docs/images/CVS/Entries
@@ -1,7 +1,7 @@
-/caution.gif/1.2/Wed May  8 21:16:44 2002/-kb/TBUGZILLA-2_16
-/dbschema.jpg/1.1/Wed Aug 29 17:25:34 2001/-kb/TBUGZILLA-2_16
-/dbschema.ps/1.1/Wed Aug 29 17:25:34 2001/-kb/TBUGZILLA-2_16
-/note.gif/1.1/Thu Aug 23 14:30:18 2001/-kb/TBUGZILLA-2_16
-/tip.gif/1.2/Wed May  8 21:16:44 2002/-kb/TBUGZILLA-2_16
-/warning.gif/1.2/Wed May  8 21:16:44 2002/-kb/TBUGZILLA-2_16
+/caution.gif/1.2/Wed May  8 21:16:44 2002/-kb/TBUGZILLA-2_16_1
+/dbschema.jpg/1.1/Wed Aug 29 17:25:34 2001/-kb/TBUGZILLA-2_16_1
+/dbschema.ps/1.1/Wed Aug 29 17:25:34 2001/-kb/TBUGZILLA-2_16_1
+/note.gif/1.1/Thu Aug 23 14:30:18 2001/-kb/TBUGZILLA-2_16_1
+/tip.gif/1.2/Wed May  8 21:16:44 2002/-kb/TBUGZILLA-2_16_1
+/warning.gif/1.2/Wed May  8 21:16:44 2002/-kb/TBUGZILLA-2_16_1
 D
diff --git a/docs/images/CVS/Tag b/docs/images/CVS/Tag
index f2ec6389c..a82894094 100644
--- a/docs/images/CVS/Tag
+++ b/docs/images/CVS/Tag
@@ -1 +1 @@
-NBUGZILLA-2_16
+NBUGZILLA-2_16_1
diff --git a/docs/rel_notes.txt b/docs/rel_notes.txt
index 06fbcf844..7513a1b4c 100644
--- a/docs/rel_notes.txt
+++ b/docs/rel_notes.txt
@@ -1,11 +1,5 @@
-After (as usual) far too long a period, the Bugzilla Team
-is relieved to finally announce Bugzilla 2.16.
-
-This release adds significant new abilities to Bugzilla,
-both for the administrator and the user. The most important,
-and time-consuming of these features is the templatisation
-of all user-facing scripts, allowing administrators to 
-easily customise the look and feel of their Bugzilla.
+The 2.16.1 release fixes various bugs found in the 2.16
+release, including some security issues.
 
 **************************
 *** ABOUT THIS VERSION ***
@@ -130,8 +124,78 @@ fix the problem on your installation.
   option "The bug is resolved or verified" to achieve part of this.
   (bug 130821)
 
+*********************************************
+*** USERS UPGRADING FROM 2.16 OR EARLIER  ***
+*********************************************
+
+*** SECURITY ISSUES RESOLVED ***
+
+- Apostrophes were not properly handled in email addresses.  This was a
+  regression introduced in 2.16.  It is not known whether this was
+  exploitable.
+  (bug 165221)
+
+See also next major section.
+
+*** Bug fixes of note ***
+
+- The VERSION cookie which allowed the previously entered version of a product
+  to be remembered was not correctly set.  It was only set as a session
+  cookie, and under some circumstances could interfere with other cookies
+  (such as the login information) send at the same time.
+  (bug 160227)
+
+- importxml.pl would fail if the versioncache needed to be updated.
+  (bug 164464)
+
+- Bug changes going through intermediate pages would munge fields with
+  multiple fields, such as CCs.
+  (bug 161203)
+
+- On failure in template->new, Bugzilla will now die rather than futilely
+  attempt to use an error template.
+  (bug 166023)
+
+- Fixed a problem where checksetup had problems converting old installations
+  that didn't have a duplicates table.
+  (bug 151619)
+
+- Fixed a problem that caused taint errors when viewing or editing user
+  preferences with Perl 5.005 and Template 2.08.
+  (bug 160710)
+
+See also next section.
+
+******************************************************
+*** USERS UPGRADING FROM 2.14.3 OR EARLIER, 2.16.0 ***
+******************************************************
+
+*** SECURITY ISSUES RESOLVED ***
+
+- When a new product is added to an installation with 47 groups or more and
+  "usebuggroups" is enabled, the new group will be assigned a groupset bit
+  using Perl math that is not exact beyond 2^48.  This results in the new
+  group being defined with a "bit" that has several bits set.  As users are
+  given access to the new group, those users will also gain access to
+  spurious lower group privileges.  Also, group bits were not always reused
+  when groups were deleted.
+  (bug 167485)
+
+- The email interface had another insecure single parameter system call.  This
+  could potentially allow arbitrary shell commands to be run.  This file is
+  not supported at this time, but as long as we knew about the problem, we
+  couldn't overlook it.
+  (bug 163024)
+
+*** Bug fixes of note ***
+
+- The email interface was broken.  This was a 2.14.3 regression.  This file
+  is not supported at this time, but as long as we knew about the problem, we
+  couldn't overlook it.
+  (bug 160631)
+
 ***********************************************
-*** USERS UPGRADING FROM 2.14.2 OR EARLIER  ***
+*** USERS UPGRADING FROM 2.14.4 OR EARLIER  ***
 ***********************************************
 
 *** SECURITY ISSUES RESOLVED ***
@@ -347,6 +411,32 @@ fix the problem on your installation.
   their only email preference was being added or removed from QA.
   (bug 143091)
 
+***********************************************
+*** USERS UPGRADING FROM 2.14.3 OR EARLIER  ***
+***********************************************
+
+See section above about users upgrading from 2.16.0 or earlier.
+
+***********************************************
+*** USERS UPGRADING FROM 2.14.2 OR EARLIER  ***
+***********************************************
+
+*** SECURITY ISSUES RESOLVED ***
+
+- Basic maintenance on contrib/bug_email.pl and
+  contrib/bugzilla_email_append.pl which also fixes a
+  possible security hole with a misuse of a system() call.
+  These files are not supported at this time, but as long
+  as we knew about the problem, we couldn't overlook it.
+  (bug 154008)
+
+*** Bug fixes of note ***
+
+- The fix for bug 130821 in 2.14.2 broke being able to sort
+  bug lists on more than one field.  buglist.cgi now allows
+  you to sort on more than one field again.
+  (bug 152138)
+
 ***********************************************
 *** USERS UPGRADING FROM 2.14.1 OR EARLIER  ***
 ***********************************************
diff --git a/docs/sgml/CVS/Entries b/docs/sgml/CVS/Entries
index 7072af724..00f904aa7 100644
--- a/docs/sgml/CVS/Entries
+++ b/docs/sgml/CVS/Entries
@@ -1,18 +1,18 @@
-/Bugzilla-Guide.sgml/1.11.2.4/Thu Jul 25 21:03:27 2002//TBUGZILLA-2_16
-/about.sgml/1.6.2.2/Sun May 12 16:15:29 2002//TBUGZILLA-2_16
-/administration.sgml/1.13.2.5/Thu Jul 25 21:03:28 2002//TBUGZILLA-2_16
-/conventions.sgml/1.4.2.4/Thu Jul 25 21:03:28 2002//TBUGZILLA-2_16
-/database.sgml/1.7.2.1/Sat May 25 15:36:06 2002//TBUGZILLA-2_16
-/dbschema.mysql/1.2/Wed May  8 23:19:09 2002//TBUGZILLA-2_16
-/faq.sgml/1.8.2.2/Sat Jul 13 07:53:28 2002//TBUGZILLA-2_16
-/gd-makefile.patch/1.1.2.1/Sun May 12 13:16:48 2002//TBUGZILLA-2_16
-/gfdl.sgml/1.4.2.1/Sun May 12 16:15:29 2002//TBUGZILLA-2_16
-/glossary.sgml/1.5.2.2/Sun May 12 16:15:29 2002//TBUGZILLA-2_16
-/index.sgml/1.3/Wed May  8 23:19:09 2002//TBUGZILLA-2_16
-/installation.sgml/1.18.2.5/Thu Jul 25 21:03:29 2002//TBUGZILLA-2_16
-/integration.sgml/1.7.2.2/Sat May 25 15:36:08 2002//TBUGZILLA-2_16
-/introduction.sgml/1.1.2.2/Thu Jul 25 21:03:29 2002//TBUGZILLA-2_16
-/patches.sgml/1.13.2.3/Sat May 25 15:36:10 2002//TBUGZILLA-2_16
-/using.sgml/1.10.2.5/Thu Jul 25 21:03:29 2002//TBUGZILLA-2_16
-/variants.sgml/1.6.2.5/Thu Jul 25 21:03:30 2002//TBUGZILLA-2_16
+/Bugzilla-Guide.sgml/1.11.2.4/Thu Jul 25 21:03:27 2002//TBUGZILLA-2_16_1
+/about.sgml/1.6.2.2/Sun May 12 16:15:29 2002//TBUGZILLA-2_16_1
+/administration.sgml/1.13.2.5/Thu Jul 25 21:03:28 2002//TBUGZILLA-2_16_1
+/conventions.sgml/1.4.2.4/Thu Jul 25 21:03:28 2002//TBUGZILLA-2_16_1
+/database.sgml/1.7.2.1/Sat May 25 15:36:06 2002//TBUGZILLA-2_16_1
+/dbschema.mysql/1.2/Wed May  8 23:19:09 2002//TBUGZILLA-2_16_1
+/faq.sgml/1.8.2.2/Sat Jul 13 07:53:28 2002//TBUGZILLA-2_16_1
+/gd-makefile.patch/1.1.2.1/Sun May 12 13:16:48 2002//TBUGZILLA-2_16_1
+/gfdl.sgml/1.4.2.1/Sun May 12 16:15:29 2002//TBUGZILLA-2_16_1
+/glossary.sgml/1.5.2.2/Sun May 12 16:15:29 2002//TBUGZILLA-2_16_1
+/index.sgml/1.3/Wed May  8 23:19:09 2002//TBUGZILLA-2_16_1
+/installation.sgml/1.18.2.5/Thu Jul 25 21:03:29 2002//TBUGZILLA-2_16_1
+/integration.sgml/1.7.2.2/Sat May 25 15:36:08 2002//TBUGZILLA-2_16_1
+/introduction.sgml/1.1.2.2/Thu Jul 25 21:03:29 2002//TBUGZILLA-2_16_1
+/patches.sgml/1.13.2.3/Sat May 25 15:36:10 2002//TBUGZILLA-2_16_1
+/using.sgml/1.10.2.5/Thu Jul 25 21:03:29 2002//TBUGZILLA-2_16_1
+/variants.sgml/1.6.2.5/Thu Jul 25 21:03:30 2002//TBUGZILLA-2_16_1
 D
diff --git a/docs/sgml/CVS/Tag b/docs/sgml/CVS/Tag
index f2ec6389c..a82894094 100644
--- a/docs/sgml/CVS/Tag
+++ b/docs/sgml/CVS/Tag
@@ -1 +1 @@
-NBUGZILLA-2_16
+NBUGZILLA-2_16_1
diff --git a/docs/txt/CVS/Entries b/docs/txt/CVS/Entries
index 139c5be93..b8363d943 100644
--- a/docs/txt/CVS/Entries
+++ b/docs/txt/CVS/Entries
@@ -1,2 +1,2 @@
-/Bugzilla-Guide.txt/1.14.2.1/Thu Jul 25 21:10:06 2002//TBUGZILLA-2_16
+/Bugzilla-Guide.txt/1.14.2.1/Thu Jul 25 21:10:06 2002//TBUGZILLA-2_16_1
 D
diff --git a/docs/txt/CVS/Tag b/docs/txt/CVS/Tag
index f2ec6389c..a82894094 100644
--- a/docs/txt/CVS/Tag
+++ b/docs/txt/CVS/Tag
@@ -1 +1 @@
-NBUGZILLA-2_16
+NBUGZILLA-2_16_1
diff --git a/editproducts.cgi b/editproducts.cgi
index 1b3441a8a..932c9a1b3 100755
--- a/editproducts.cgi
+++ b/editproducts.cgi
@@ -328,6 +328,51 @@ if ($action eq 'new') {
     $votestoconfirm ||= 0;
     my $defaultmilestone = $::FORM{defaultmilestone} || "---";
 
+
+    # find the next bit first in case this operation fails; we don't calculate
+    # this by hand; table stolen from editgroups.cgi; see bug 167485
+    my $bit = "";
+    if(Param("usebuggroups")) {
+        my @bitvals = ('1','2','4','8','16','32','64','128','256','512','1024',
+                       '2048','4096','8192','16384','32768',
+    
+                       '65536','131072','262144','524288','1048576','2097152',
+                       '4194304','8388608','16777216','33554432','67108864',
+                       '134217728','268435456','536870912','1073741824',
+                       '2147483648',
+
+                       '4294967296','8589934592','17179869184','34359738368',
+                       '68719476736','137438953472','274877906944',
+                       '549755813888','1099511627776','2199023255552',
+                       '4398046511104','8796093022208','17592186044416',
+                       '35184372088832','70368744177664','140737488355328',
+
+                       '281474976710656','562949953421312','1125899906842624',
+                       '2251799813685248','4503599627370496','9007199254740992',
+                       '18014398509481984','36028797018963968','72057594037927936',
+                       '144115188075855872','288230376151711744',
+                       '576460752303423488','1152921504606846976',
+                       '2305843009213693952','4611686018427387904');
+    
+        # First the next available bit
+        foreach my $bv (@bitvals) {
+            if ($bit eq "") {
+                SendSQL("SELECT bit FROM groups WHERE bit=" . SqlQuote($bv));
+                if (!FetchOneColumn()) { 
+                    $bit = $bv; 
+                }
+            }
+        }
+        if ($bit eq "") {
+            ShowError("Sorry, you already have the maximum number of groups " .
+                      "defined.<BR><BR>You must delete a group first before you " .
+                      "can add any more.</B>");
+            PutTrailer("<a href=editgroups.cgi>Back to the group list</a>");
+            exit;
+        }
+    }
+        
+
     # Add the new product.
     SendSQL("INSERT INTO products ( " .
             "product, description, milestoneurl, disallownew, votesperuser, " .
@@ -351,16 +396,6 @@ if ($action eq 'new') {
     # If we're using bug groups, then we need to create a group for this
     # product as well.  -JMR, 2/16/00
     if(Param("usebuggroups")) {
-        # First we need to figure out the bit for this group.  We'll simply
-        # use the next highest bit available.  We'll use a minimum bit of 256,
-        # to leave room for a few more Bugzilla operation groups at the bottom.
-        SendSQL("SELECT MAX(bit) FROM groups");
-        my $bit = FetchOneColumn();
-        if($bit < 256) {
-            $bit = 256;
-        } else {
-            $bit = $bit * 2;
-        }
         
         # Next we insert into the groups table
         SendSQL("INSERT INTO groups " .
diff --git a/globals.pl b/globals.pl
index ee0e4f153..15e4bcecc 100644
--- a/globals.pl
+++ b/globals.pl
@@ -98,7 +98,7 @@ $::SIG{TERM} = 'IGNORE';
 $::SIG{PIPE} = 'IGNORE';
 
 # Contains the version string for the current running Bugzilla.
-$::param{'version'} = '2.16';
+$::param{'version'} = '2.16.1';
 
 $::dontchange = "--do_not_change--";
 $::chooseone = "--Choose_one:--";
@@ -646,11 +646,19 @@ sub ValidateNewUser {
         return 0;
     }
 
+    my $sqluname = SqlQuote($username);
+
     # Reject if the new login is part of an email change which is 
     # still in progress
+    #
+    # substring/locate stuff: bug 165221; this used to use regexes, but that
+    # was unsafe and required weird escaping; using substring to pull out
+    # the new/old email addresses and locate() to find the delimeter (':')
+    # is cleaner/safer
     SendSQL("SELECT eventdata FROM tokens WHERE tokentype = 'emailold' 
-                AND eventdata like '%:$username' 
-                 OR eventdata like '$username:%'");
+     AND SUBSTRING(eventdata, 1, (LOCATE(':', eventdata) - 1)) = $sqluname 
+     OR SUBSTRING(eventdata, (LOCATE(':', eventdata) + 1)) = $sqluname");
+
     if (my ($eventdata) = FetchSQLData()) {
         # Allow thru owner of token
         if($old_username && ($eventdata eq "$old_username:$username")) {
@@ -1585,8 +1593,7 @@ $::template ||= Template->new(
         url_quote => \&url_quote ,
       } ,
   }
-) || DisplayError("Template creation failed: " . Template->error())
-  && exit;
+) || die("Template creation failed: " . Template->error());
 
 # Use the Toolkit Template's Stash module to add utility pseudo-methods
 # to template variables.
diff --git a/importxml.pl b/importxml.pl
index 964d29a6f..3670609a4 100755
--- a/importxml.pl
+++ b/importxml.pl
@@ -68,8 +68,8 @@ require "CGI.pl";
 require "globals.pl";
 $::lockcount = 0;
 
-GetVersionTable();
 ConnectToDatabase();
+GetVersionTable();
 
 
 sub sillyness {
diff --git a/post_bug.cgi b/post_bug.cgi
index 8bba70d59..2edb1aca4 100755
--- a/post_bug.cgi
+++ b/post_bug.cgi
@@ -75,8 +75,8 @@ my $product = $::FORM{'product'};
 my $cookiepath = Param("cookiepath");
 if (exists $::FORM{'product'}) {
     if (exists $::FORM{'version'}) {           
-        print "Set-Cookie: VERSION-$product=$::FORM{'version'} ; \
-               path=$cookiepath ; expires=Sun, 30-Jun-2029 00:00:00 GMT\n"; 
+        print "Set-Cookie: VERSION-$product=$::FORM{'version'} ; " .
+              "path=$cookiepath ; expires=Sun, 30-Jun-2029 00:00:00 GMT\n"; 
     }
 }
 
diff --git a/process_bug.cgi b/process_bug.cgi
index 5482a1ad2..43c926867 100755
--- a/process_bug.cgi
+++ b/process_bug.cgi
@@ -42,7 +42,6 @@ use RelationSet;
 use vars qw(%versions
           %components
           %COOKIE
-          %MFORM
           %legal_keywords
           %legal_opsys
           %legal_platform
@@ -188,6 +187,7 @@ if ((($::FORM{'id'} && $::FORM{'product'} ne $::oldproduct)
     # a verification form.
     if (!$vok || !$cok || !$mok || (Param('usebuggroups') && !defined($::FORM{'addtonewgroup'}))) {
         $vars->{'form'} = \%::FORM;
+        $vars->{'mform'} = \%::MFORM;
         
         if (!$vok || !$cok || !$mok) {
             $vars->{'verify_fields'} = 1;
@@ -344,6 +344,7 @@ sub DuplicateUserConfirm {
     # ask the duper what he/she wants to do.
     
     $vars->{'form'} = \%::FORM;
+    $vars->{'mform'} = \%::MFORM;
     $vars->{'original_bug_id'} = $original;
     $vars->{'duplicate_bug_id'} = $dupe;
     
@@ -885,6 +886,7 @@ foreach my $id (@idlist) {
 
         $::FORM{'delta_ts'} = $delta_ts;
         $vars->{'form'} = \%::FORM;
+        $vars->{'mform'} = \%::MFORM;
         
         $vars->{'bug_id'} = $id;
         $vars->{'quoteUrls'} = \&quoteUrls;
diff --git a/t/CVS/Entries b/t/CVS/Entries
index aa7c1f181..37c913d59 100644
--- a/t/CVS/Entries
+++ b/t/CVS/Entries
@@ -1,6 +1,6 @@
-/001compile.t/1.8/Wed May  8 23:49:31 2002//TBUGZILLA-2_16
-/002goodperl.t/1.7/Wed May  8 23:49:31 2002//TBUGZILLA-2_16
-/003safesys.t/1.4/Wed May  8 23:49:31 2002//TBUGZILLA-2_16
-/004template.t/1.15.2.2/Fri Jul 19 14:04:12 2002//TBUGZILLA-2_16
-/005no_tabs.t/1.10/Wed May  8 23:49:32 2002//TBUGZILLA-2_16
+/001compile.t/1.8/Wed May  8 23:49:31 2002//TBUGZILLA-2_16_1
+/002goodperl.t/1.7/Wed May  8 23:49:31 2002//TBUGZILLA-2_16_1
+/003safesys.t/1.4/Wed May  8 23:49:31 2002//TBUGZILLA-2_16_1
+/004template.t/1.15.2.2/Fri Jul 19 14:04:12 2002//TBUGZILLA-2_16_1
+/005no_tabs.t/1.10/Wed May  8 23:49:32 2002//TBUGZILLA-2_16_1
 D/Support////
diff --git a/t/CVS/Tag b/t/CVS/Tag
index f2ec6389c..a82894094 100644
--- a/t/CVS/Tag
+++ b/t/CVS/Tag
@@ -1 +1 @@
-NBUGZILLA-2_16
+NBUGZILLA-2_16_1
diff --git a/t/Support/CVS/Entries b/t/Support/CVS/Entries
index c28efeaf3..1d3c884f4 100644
--- a/t/Support/CVS/Entries
+++ b/t/Support/CVS/Entries
@@ -1,4 +1,4 @@
-/Files.pm/1.9/Wed Oct 31 01:06:31 2001//TBUGZILLA-2_16
-/Systemexec.pm/1.2/Fri Oct 19 22:39:51 2001//TBUGZILLA-2_16
-/Templates.pm/1.9/Tue May  7 09:45:32 2002//TBUGZILLA-2_16
+/Files.pm/1.9/Wed Oct 31 01:06:31 2001//TBUGZILLA-2_16_1
+/Systemexec.pm/1.2/Fri Oct 19 22:39:51 2001//TBUGZILLA-2_16_1
+/Templates.pm/1.9/Tue May  7 09:45:32 2002//TBUGZILLA-2_16_1
 D
diff --git a/t/Support/CVS/Tag b/t/Support/CVS/Tag
index f2ec6389c..a82894094 100644
--- a/t/Support/CVS/Tag
+++ b/t/Support/CVS/Tag
@@ -1 +1 @@
-NBUGZILLA-2_16
+NBUGZILLA-2_16_1
diff --git a/template/CVS/Entries b/template/CVS/Entries
index 322cc0a40..a1b56454f 100644
--- a/template/CVS/Entries
+++ b/template/CVS/Entries
@@ -1,2 +1,2 @@
-/.cvsignore/1.3/Tue May  7 21:33:53 2002//TBUGZILLA-2_16
+/.cvsignore/1.3/Tue May  7 21:33:53 2002//TBUGZILLA-2_16_1
 D/en////
diff --git a/template/CVS/Tag b/template/CVS/Tag
index f2ec6389c..a82894094 100644
--- a/template/CVS/Tag
+++ b/template/CVS/Tag
@@ -1 +1 @@
-NBUGZILLA-2_16
+NBUGZILLA-2_16_1
diff --git a/template/en/CVS/Entries b/template/en/CVS/Entries
index a3ef794e0..7cb3fbcfd 100644
--- a/template/en/CVS/Entries
+++ b/template/en/CVS/Entries
@@ -1,2 +1,2 @@
-/.cvsignore/1.1/Wed Apr 24 07:29:49 2002//TBUGZILLA-2_16
+/.cvsignore/1.1/Wed Apr 24 07:29:49 2002//TBUGZILLA-2_16_1
 D/default////
diff --git a/template/en/CVS/Tag b/template/en/CVS/Tag
index f2ec6389c..a82894094 100644
--- a/template/en/CVS/Tag
+++ b/template/en/CVS/Tag
@@ -1 +1 @@
-NBUGZILLA-2_16
+NBUGZILLA-2_16_1
diff --git a/template/en/default/CVS/Entries b/template/en/default/CVS/Entries
index e620d0dbb..729fd3b81 100644
--- a/template/en/default/CVS/Entries
+++ b/template/en/default/CVS/Entries
@@ -1,5 +1,5 @@
-/index.html.tmpl/1.4.2.2/Sun Jun 23 17:36:05 2002//TBUGZILLA-2_16
-/sidebar.xul.tmpl/1.3.2.1/Wed Jul 10 00:05:58 2002//TBUGZILLA-2_16
+/index.html.tmpl/1.4.2.2/Sun Jun 23 17:36:05 2002//TBUGZILLA-2_16_1
+/sidebar.xul.tmpl/1.3.2.1/Wed Jul 10 00:05:58 2002//TBUGZILLA-2_16_1
 D/account////
 D/admin////
 D/attachment////
diff --git a/template/en/default/CVS/Entries.Log b/template/en/default/CVS/Entries.Log
index 8ecd675ef..3f7b14dda 100644
--- a/template/en/default/CVS/Entries.Log
+++ b/template/en/default/CVS/Entries.Log
@@ -1,2 +1,6 @@
+A D/flag////
+A D/pages////
 A D/request////
 R D/request////
+R D/pages////
+R D/flag////
diff --git a/template/en/default/CVS/Tag b/template/en/default/CVS/Tag
index f2ec6389c..a82894094 100644
--- a/template/en/default/CVS/Tag
+++ b/template/en/default/CVS/Tag
@@ -1 +1 @@
-NBUGZILLA-2_16
+NBUGZILLA-2_16_1
diff --git a/template/en/default/account/CVS/Entries b/template/en/default/account/CVS/Entries
index 3ee98f324..5a2e2a219 100644
--- a/template/en/default/account/CVS/Entries
+++ b/template/en/default/account/CVS/Entries
@@ -1,7 +1,7 @@
-/cancel-token.txt.tmpl/1.1/Thu Apr 18 18:56:15 2002//TBUGZILLA-2_16
-/create.html.tmpl/1.3/Tue Apr 23 23:27:32 2002//TBUGZILLA-2_16
-/created.html.tmpl/1.4/Mon May  6 19:16:50 2002//TBUGZILLA-2_16
-/exists.html.tmpl/1.4.2.1/Thu May 23 08:13:49 2002//TBUGZILLA-2_16
+/cancel-token.txt.tmpl/1.1/Thu Apr 18 18:56:15 2002//TBUGZILLA-2_16_1
+/create.html.tmpl/1.3/Tue Apr 23 23:27:32 2002//TBUGZILLA-2_16_1
+/created.html.tmpl/1.4/Mon May  6 19:16:50 2002//TBUGZILLA-2_16_1
+/exists.html.tmpl/1.4.2.1/Thu May 23 08:13:49 2002//TBUGZILLA-2_16_1
 D/email////
 D/password////
 D/prefs////
diff --git a/template/en/default/account/CVS/Tag b/template/en/default/account/CVS/Tag
index f2ec6389c..a82894094 100644
--- a/template/en/default/account/CVS/Tag
+++ b/template/en/default/account/CVS/Tag
@@ -1 +1 @@
-NBUGZILLA-2_16
+NBUGZILLA-2_16_1
diff --git a/template/en/default/account/email/CVS/Entries b/template/en/default/account/email/CVS/Entries
index e222910d8..11e8690f3 100644
--- a/template/en/default/account/email/CVS/Entries
+++ b/template/en/default/account/email/CVS/Entries
@@ -1,4 +1,4 @@
-/change-new.txt.tmpl/1.3/Fri May  3 06:37:42 2002//TBUGZILLA-2_16
-/change-old.txt.tmpl/1.4/Mon May  6 19:16:46 2002//TBUGZILLA-2_16
-/confirm.html.tmpl/1.4.2.1/Thu May 23 08:13:51 2002//TBUGZILLA-2_16
+/change-new.txt.tmpl/1.3/Fri May  3 06:37:42 2002//TBUGZILLA-2_16_1
+/change-old.txt.tmpl/1.4/Mon May  6 19:16:46 2002//TBUGZILLA-2_16_1
+/confirm.html.tmpl/1.4.2.1/Thu May 23 08:13:51 2002//TBUGZILLA-2_16_1
 D
diff --git a/template/en/default/account/email/CVS/Tag b/template/en/default/account/email/CVS/Tag
index f2ec6389c..a82894094 100644
--- a/template/en/default/account/email/CVS/Tag
+++ b/template/en/default/account/email/CVS/Tag
@@ -1 +1 @@
-NBUGZILLA-2_16
+NBUGZILLA-2_16_1
diff --git a/template/en/default/account/password/CVS/Entries b/template/en/default/account/password/CVS/Entries
index ab1679f83..03f068576 100644
--- a/template/en/default/account/password/CVS/Entries
+++ b/template/en/default/account/password/CVS/Entries
@@ -1,3 +1,3 @@
-/forgotten-password.txt.tmpl/1.2/Fri May  3 06:37:47 2002//TBUGZILLA-2_16
-/set-forgotten-password.html.tmpl/1.3.2.1/Thu May 23 08:13:56 2002//TBUGZILLA-2_16
+/forgotten-password.txt.tmpl/1.2/Fri May  3 06:37:47 2002//TBUGZILLA-2_16_1
+/set-forgotten-password.html.tmpl/1.3.2.1/Thu May 23 08:13:56 2002//TBUGZILLA-2_16_1
 D
diff --git a/template/en/default/account/password/CVS/Tag b/template/en/default/account/password/CVS/Tag
index f2ec6389c..a82894094 100644
--- a/template/en/default/account/password/CVS/Tag
+++ b/template/en/default/account/password/CVS/Tag
@@ -1 +1 @@
-NBUGZILLA-2_16
+NBUGZILLA-2_16_1
diff --git a/template/en/default/account/prefs/CVS/Entries b/template/en/default/account/prefs/CVS/Entries
index ea36789d8..71c23550e 100644
--- a/template/en/default/account/prefs/CVS/Entries
+++ b/template/en/default/account/prefs/CVS/Entries
@@ -1,6 +1,6 @@
-/account.html.tmpl/1.1.2.1/Thu May 23 08:13:58 2002//TBUGZILLA-2_16
-/email.html.tmpl/1.1.2.3/Wed Jul 17 18:28:37 2002//TBUGZILLA-2_16
-/footer.html.tmpl/1.1.2.1/Thu May 23 08:13:59 2002//TBUGZILLA-2_16
-/permissions.html.tmpl/1.1.2.1/Thu May 23 08:13:59 2002//TBUGZILLA-2_16
-/prefs.html.tmpl/1.4.2.1/Thu May 23 08:14:00 2002//TBUGZILLA-2_16
+/account.html.tmpl/1.1.2.1/Thu May 23 08:13:58 2002//TBUGZILLA-2_16_1
+/email.html.tmpl/1.1.2.3/Wed Jul 17 18:28:37 2002//TBUGZILLA-2_16_1
+/footer.html.tmpl/1.1.2.1/Thu May 23 08:13:59 2002//TBUGZILLA-2_16_1
+/permissions.html.tmpl/1.1.2.1/Thu May 23 08:13:59 2002//TBUGZILLA-2_16_1
+/prefs.html.tmpl/1.4.2.2/Tue Aug 13 06:57:03 2002//TBUGZILLA-2_16_1
 D
diff --git a/template/en/default/account/prefs/CVS/Tag b/template/en/default/account/prefs/CVS/Tag
index f2ec6389c..a82894094 100644
--- a/template/en/default/account/prefs/CVS/Tag
+++ b/template/en/default/account/prefs/CVS/Tag
@@ -1 +1 @@
-NBUGZILLA-2_16
+NBUGZILLA-2_16_1
diff --git a/template/en/default/account/prefs/prefs.html.tmpl b/template/en/default/account/prefs/prefs.html.tmpl
index 2a232f875..4e5357a4a 100644
--- a/template/en/default/account/prefs/prefs.html.tmpl
+++ b/template/en/default/account/prefs/prefs.html.tmpl
@@ -100,7 +100,16 @@
 <form method="post">
   <input type="hidden" name="tab" value="[% current_tab.name %]">
 
-  [% PROCESS "account/prefs/${current_tab.name}.html.tmpl" IF current_tab.name.defined %]
+  [%# See bug 160710 for why this is done this way %]
+  [% IF current_tab.name == "account" %]
+    [% PROCESS "account/prefs/account.html.tmpl" %]
+  [% ELSIF current_tab.name == "email" %]
+    [% PROCESS "account/prefs/email.html.tmpl" %]
+  [% ELSIF current_tab.name == "footer" %]
+    [% PROCESS "account/prefs/footer.html.tmpl" %]
+  [% ELSIF current_tab.name == "permissions" %]
+    [% PROCESS "account/prefs/permissions.html.tmpl" %]
+  [% END %]
 
   [% IF current_tab.saveable %]
     <input type="hidden" name="dosave" value="1">
diff --git a/template/en/default/admin/CVS/Entries.Log b/template/en/default/admin/CVS/Entries.Log
index b7cf2b248..73aacf948 100644
--- a/template/en/default/admin/CVS/Entries.Log
+++ b/template/en/default/admin/CVS/Entries.Log
@@ -1,2 +1,8 @@
+A D/common////
+A D/flag-type////
+A D/keywords////
 A D/request-type////
 R D/request-type////
+R D/keywords////
+R D/flag-type////
+R D/common////
diff --git a/template/en/default/admin/CVS/Tag b/template/en/default/admin/CVS/Tag
index 445ba5a94..4bfd2873e 100644
--- a/template/en/default/admin/CVS/Tag
+++ b/template/en/default/admin/CVS/Tag
@@ -1 +1 @@
-TBUGZILLA-2_16
+TBUGZILLA-2_16_1
diff --git a/template/en/default/admin/attachstatus/CVS/Entries b/template/en/default/admin/attachstatus/CVS/Entries
index 2f8d2a093..8c89a437c 100644
--- a/template/en/default/admin/attachstatus/CVS/Entries
+++ b/template/en/default/admin/attachstatus/CVS/Entries
@@ -1,5 +1,5 @@
-/create.html.tmpl/1.3/Tue Apr 23 23:27:26 2002//TBUGZILLA-2_16
-/delete.html.tmpl/1.3/Tue Apr 23 23:27:25 2002//TBUGZILLA-2_16
-/edit.html.tmpl/1.4/Mon May  6 19:16:58 2002//TBUGZILLA-2_16
-/list.html.tmpl/1.4/Mon May  6 19:16:58 2002//TBUGZILLA-2_16
+/create.html.tmpl/1.3/Tue Apr 23 23:27:26 2002//TBUGZILLA-2_16_1
+/delete.html.tmpl/1.3/Tue Apr 23 23:27:25 2002//TBUGZILLA-2_16_1
+/edit.html.tmpl/1.4/Mon May  6 19:16:58 2002//TBUGZILLA-2_16_1
+/list.html.tmpl/1.4/Mon May  6 19:16:58 2002//TBUGZILLA-2_16_1
 D
diff --git a/template/en/default/admin/attachstatus/CVS/Tag b/template/en/default/admin/attachstatus/CVS/Tag
index f2ec6389c..a82894094 100644
--- a/template/en/default/admin/attachstatus/CVS/Tag
+++ b/template/en/default/admin/attachstatus/CVS/Tag
@@ -1 +1 @@
-NBUGZILLA-2_16
+NBUGZILLA-2_16_1
diff --git a/template/en/default/attachment/CVS/Entries b/template/en/default/attachment/CVS/Entries
index 385a2a9c8..1bc6d5754 100644
--- a/template/en/default/attachment/CVS/Entries
+++ b/template/en/default/attachment/CVS/Entries
@@ -1,8 +1,8 @@
-/content-types.html.tmpl/1.1/Thu Apr 18 18:56:29 2002//TBUGZILLA-2_16
-/create.html.tmpl/1.5.2.2/Tue Jun  4 22:56:38 2002//TBUGZILLA-2_16
-/created.html.tmpl/1.4.2.1/Thu May 23 08:14:02 2002//TBUGZILLA-2_16
-/edit.html.tmpl/1.4.2.2/Tue Jun 11 09:27:21 2002//TBUGZILLA-2_16
-/list.html.tmpl/1.1/Thu Apr 18 18:56:30 2002//TBUGZILLA-2_16
-/show-multiple.html.tmpl/1.3.2.1/Thu May 23 08:14:03 2002//TBUGZILLA-2_16
-/updated.html.tmpl/1.4.2.1/Thu May 23 08:14:03 2002//TBUGZILLA-2_16
+/content-types.html.tmpl/1.1/Thu Apr 18 18:56:29 2002//TBUGZILLA-2_16_1
+/create.html.tmpl/1.5.2.2/Tue Jun  4 22:56:38 2002//TBUGZILLA-2_16_1
+/created.html.tmpl/1.4.2.1/Thu May 23 08:14:02 2002//TBUGZILLA-2_16_1
+/edit.html.tmpl/1.4.2.2/Tue Jun 11 09:27:21 2002//TBUGZILLA-2_16_1
+/list.html.tmpl/1.1/Thu Apr 18 18:56:30 2002//TBUGZILLA-2_16_1
+/show-multiple.html.tmpl/1.3.2.1/Thu May 23 08:14:03 2002//TBUGZILLA-2_16_1
+/updated.html.tmpl/1.4.2.1/Thu May 23 08:14:03 2002//TBUGZILLA-2_16_1
 D
diff --git a/template/en/default/attachment/CVS/Tag b/template/en/default/attachment/CVS/Tag
index f2ec6389c..a82894094 100644
--- a/template/en/default/attachment/CVS/Tag
+++ b/template/en/default/attachment/CVS/Tag
@@ -1 +1 @@
-NBUGZILLA-2_16
+NBUGZILLA-2_16_1
diff --git a/template/en/default/bug/CVS/Entries b/template/en/default/bug/CVS/Entries
index 442125127..c9b55318b 100644
--- a/template/en/default/bug/CVS/Entries
+++ b/template/en/default/bug/CVS/Entries
@@ -1,11 +1,11 @@
-/choose-xml.html.tmpl/1.4.2.1/Thu May 23 08:14:05 2002//TBUGZILLA-2_16
-/choose.html.tmpl/1.3/Tue Apr 23 23:27:50 2002//TBUGZILLA-2_16
-/comments.html.tmpl/1.1.2.1/Sat Jun 22 21:03:21 2002//TBUGZILLA-2_16
-/dependency-graph.html.tmpl/1.5.2.1/Thu May 23 08:14:05 2002//TBUGZILLA-2_16
-/dependency-tree.html.tmpl/1.4.2.1/Mon May 13 06:24:20 2002//TBUGZILLA-2_16
-/edit.html.tmpl/1.7.2.5/Tue Jul  9 01:17:59 2002//TBUGZILLA-2_16
-/navigate.html.tmpl/1.1.2.1/Thu May  9 23:15:05 2002//TBUGZILLA-2_16
-/show-multiple.html.tmpl/1.3.2.1/Thu May 23 08:14:05 2002//TBUGZILLA-2_16
+/choose-xml.html.tmpl/1.4.2.1/Thu May 23 08:14:05 2002//TBUGZILLA-2_16_1
+/choose.html.tmpl/1.3/Tue Apr 23 23:27:50 2002//TBUGZILLA-2_16_1
+/comments.html.tmpl/1.1.2.1/Sat Jun 22 21:03:21 2002//TBUGZILLA-2_16_1
+/dependency-graph.html.tmpl/1.5.2.1/Thu May 23 08:14:05 2002//TBUGZILLA-2_16_1
+/dependency-tree.html.tmpl/1.4.2.1/Mon May 13 06:24:20 2002//TBUGZILLA-2_16_1
+/edit.html.tmpl/1.7.2.5/Tue Jul  9 01:17:59 2002//TBUGZILLA-2_16_1
+/navigate.html.tmpl/1.1.2.1/Thu May  9 23:15:05 2002//TBUGZILLA-2_16_1
+/show-multiple.html.tmpl/1.3.2.1/Thu May 23 08:14:05 2002//TBUGZILLA-2_16_1
 D/activity////
 D/create////
 D/process////
diff --git a/template/en/default/bug/CVS/Tag b/template/en/default/bug/CVS/Tag
index f2ec6389c..a82894094 100644
--- a/template/en/default/bug/CVS/Tag
+++ b/template/en/default/bug/CVS/Tag
@@ -1 +1 @@
-NBUGZILLA-2_16
+NBUGZILLA-2_16_1
diff --git a/template/en/default/bug/activity/CVS/Entries b/template/en/default/bug/activity/CVS/Entries
index e04b9995d..b6cfea6e7 100644
--- a/template/en/default/bug/activity/CVS/Entries
+++ b/template/en/default/bug/activity/CVS/Entries
@@ -1,3 +1,3 @@
-/show.html.tmpl/1.3.2.1/Thu May 23 08:14:07 2002//TBUGZILLA-2_16
-/table.html.tmpl/1.1/Thu Apr 18 18:56:38 2002//TBUGZILLA-2_16
+/show.html.tmpl/1.3.2.1/Thu May 23 08:14:07 2002//TBUGZILLA-2_16_1
+/table.html.tmpl/1.1/Thu Apr 18 18:56:38 2002//TBUGZILLA-2_16_1
 D
diff --git a/template/en/default/bug/activity/CVS/Tag b/template/en/default/bug/activity/CVS/Tag
index f2ec6389c..a82894094 100644
--- a/template/en/default/bug/activity/CVS/Tag
+++ b/template/en/default/bug/activity/CVS/Tag
@@ -1 +1 @@
-NBUGZILLA-2_16
+NBUGZILLA-2_16_1
diff --git a/template/en/default/bug/create/CVS/Entries b/template/en/default/bug/create/CVS/Entries
index 02f867eab..034b796e4 100644
--- a/template/en/default/bug/create/CVS/Entries
+++ b/template/en/default/bug/create/CVS/Entries
@@ -1,6 +1,6 @@
-/comment.txt.tmpl/1.2/Mon May  6 19:17:06 2002//TBUGZILLA-2_16
-/create.html.tmpl/1.6.2.4/Sun Jun 30 04:24:51 2002//TBUGZILLA-2_16
-/created.html.tmpl/1.4/Wed May  1 19:00:46 2002//TBUGZILLA-2_16
-/make-template.html.tmpl/1.3/Tue Apr 23 23:27:48 2002//TBUGZILLA-2_16
-/user-message.html.tmpl/1.1.2.1/Wed Jun  5 03:42:23 2002//TBUGZILLA-2_16
+/comment.txt.tmpl/1.2/Mon May  6 19:17:06 2002//TBUGZILLA-2_16_1
+/create.html.tmpl/1.6.2.4/Sun Jun 30 04:24:51 2002//TBUGZILLA-2_16_1
+/created.html.tmpl/1.4/Wed May  1 19:00:46 2002//TBUGZILLA-2_16_1
+/make-template.html.tmpl/1.3/Tue Apr 23 23:27:48 2002//TBUGZILLA-2_16_1
+/user-message.html.tmpl/1.1.2.1/Wed Jun  5 03:42:23 2002//TBUGZILLA-2_16_1
 D
diff --git a/template/en/default/bug/create/CVS/Tag b/template/en/default/bug/create/CVS/Tag
index f2ec6389c..a82894094 100644
--- a/template/en/default/bug/create/CVS/Tag
+++ b/template/en/default/bug/create/CVS/Tag
@@ -1 +1 @@
-NBUGZILLA-2_16
+NBUGZILLA-2_16_1
diff --git a/template/en/default/bug/process/CVS/Entries b/template/en/default/bug/process/CVS/Entries
index 66376c839..66dc03d3e 100644
--- a/template/en/default/bug/process/CVS/Entries
+++ b/template/en/default/bug/process/CVS/Entries
@@ -1,6 +1,6 @@
-/confirm-duplicate.html.tmpl/1.2/Wed Apr 24 18:07:14 2002//TBUGZILLA-2_16
-/midair.html.tmpl/1.3/Sun Apr 28 22:16:14 2002//TBUGZILLA-2_16
-/next.html.tmpl/1.1/Sun Apr 21 21:30:21 2002//TBUGZILLA-2_16
-/results.html.tmpl/1.3/Wed May  1 19:00:49 2002//TBUGZILLA-2_16
-/verify-new-product.html.tmpl/1.3.2.4/Tue Jun 25 10:08:57 2002//TBUGZILLA-2_16
+/confirm-duplicate.html.tmpl/1.2.2.1/Tue Sep  3 07:24:57 2002//TBUGZILLA-2_16_1
+/midair.html.tmpl/1.3.2.1/Tue Sep  3 07:24:58 2002//TBUGZILLA-2_16_1
+/next.html.tmpl/1.1/Sun Apr 21 21:30:21 2002//TBUGZILLA-2_16_1
+/results.html.tmpl/1.3/Wed May  1 19:00:49 2002//TBUGZILLA-2_16_1
+/verify-new-product.html.tmpl/1.3.2.5/Tue Sep  3 07:24:58 2002//TBUGZILLA-2_16_1
 D
diff --git a/template/en/default/bug/process/CVS/Tag b/template/en/default/bug/process/CVS/Tag
index f2ec6389c..a82894094 100644
--- a/template/en/default/bug/process/CVS/Tag
+++ b/template/en/default/bug/process/CVS/Tag
@@ -1 +1 @@
-NBUGZILLA-2_16
+NBUGZILLA-2_16_1
diff --git a/template/en/default/bug/process/confirm-duplicate.html.tmpl b/template/en/default/bug/process/confirm-duplicate.html.tmpl
index 172571900..abb0f719f 100644
--- a/template/en/default/bug/process/confirm-duplicate.html.tmpl
+++ b/template/en/default/bug/process/confirm-duplicate.html.tmpl
@@ -21,6 +21,7 @@
 
 [%# INTERFACE:
   # form: hash; the form values submitted to the script
+  # mform: hash; the form multi-values submitted to the script
   # original_bug_id: number; the bug number for the bug
   #   against which a bug is being duped
   # duplicate_bug_id: number; the bug number for the bug
diff --git a/template/en/default/bug/process/midair.html.tmpl b/template/en/default/bug/process/midair.html.tmpl
index a30e89b3c..21f5f6fb2 100644
--- a/template/en/default/bug/process/midair.html.tmpl
+++ b/template/en/default/bug/process/midair.html.tmpl
@@ -21,6 +21,7 @@
 
 [%# INTERFACE:
   # form: hash; the form values submitted to the script
+  # mform: hash; the form multi-values submitted to the script
   # operations: array; bug activity since the user last displayed the bug form,
   #   used by bug/activity/table.html.tmpl to display recent changes that will
   #   be overwritten if the user submits these changes.  See that template
diff --git a/template/en/default/bug/process/verify-new-product.html.tmpl b/template/en/default/bug/process/verify-new-product.html.tmpl
index 21c5664b8..77a2ab762 100644
--- a/template/en/default/bug/process/verify-new-product.html.tmpl
+++ b/template/en/default/bug/process/verify-new-product.html.tmpl
@@ -21,6 +21,7 @@
 
 [%# INTERFACE:
   # form: hash; the form values submitted to the script
+  # mform: hash; the form multi-values submitted to the script
   # verify_fields: boolean; whether or not to verify 
   #   the version, component, and target milestone fields
   # versions: array; versions for the new product.
diff --git a/template/en/default/bug/votes/CVS/Entries b/template/en/default/bug/votes/CVS/Entries
index e4f3a8a64..93f3ee8ac 100644
--- a/template/en/default/bug/votes/CVS/Entries
+++ b/template/en/default/bug/votes/CVS/Entries
@@ -1,4 +1,4 @@
-/delete-all.html.tmpl/1.4/Mon May  6 19:17:09 2002//TBUGZILLA-2_16
-/list-for-bug.html.tmpl/1.4.2.3/Sat Jun 22 10:35:09 2002//TBUGZILLA-2_16
-/list-for-user.html.tmpl/1.6.2.1/Thu May 23 08:14:16 2002//TBUGZILLA-2_16
+/delete-all.html.tmpl/1.4/Mon May  6 19:17:09 2002//TBUGZILLA-2_16_1
+/list-for-bug.html.tmpl/1.4.2.3/Sat Jun 22 10:35:09 2002//TBUGZILLA-2_16_1
+/list-for-user.html.tmpl/1.6.2.1/Thu May 23 08:14:16 2002//TBUGZILLA-2_16_1
 D
diff --git a/template/en/default/bug/votes/CVS/Tag b/template/en/default/bug/votes/CVS/Tag
index f2ec6389c..a82894094 100644
--- a/template/en/default/bug/votes/CVS/Tag
+++ b/template/en/default/bug/votes/CVS/Tag
@@ -1 +1 @@
-NBUGZILLA-2_16
+NBUGZILLA-2_16_1
diff --git a/template/en/default/global/CVS/Entries b/template/en/default/global/CVS/Entries
index 261c6fc84..da57ad688 100644
--- a/template/en/default/global/CVS/Entries
+++ b/template/en/default/global/CVS/Entries
@@ -1,11 +1,11 @@
-/banner.html.tmpl/1.1.2.1/Tue Jun  4 05:56:34 2002//TBUGZILLA-2_16
-/choose-product.html.tmpl/1.6/Mon May  6 19:17:11 2002//TBUGZILLA-2_16
-/code-error.html.tmpl/1.4/Mon May  6 19:17:11 2002//TBUGZILLA-2_16
-/footer.html.tmpl/1.6/Tue May  7 21:56:40 2002//TBUGZILLA-2_16
-/header.html.tmpl/1.5.2.7/Thu Jul  4 11:21:00 2002//TBUGZILLA-2_16
-/hidden-fields.html.tmpl/1.2.2.2/Mon Jul 22 11:06:25 2002//TBUGZILLA-2_16
-/message.html.tmpl/1.3/Mon May  6 19:17:11 2002//TBUGZILLA-2_16
-/select-menu.html.tmpl/1.1.2.1/Mon Jun  3 22:34:12 2002//TBUGZILLA-2_16
-/useful-links.html.tmpl/1.2.2.6/Wed Jul 10 00:06:00 2002//TBUGZILLA-2_16
-/user-error.html.tmpl/1.4/Mon May  6 19:17:12 2002//TBUGZILLA-2_16
+/banner.html.tmpl/1.1.2.1/Tue Jun  4 05:56:34 2002//TBUGZILLA-2_16_1
+/choose-product.html.tmpl/1.6/Mon May  6 19:17:11 2002//TBUGZILLA-2_16_1
+/code-error.html.tmpl/1.4/Mon May  6 19:17:11 2002//TBUGZILLA-2_16_1
+/footer.html.tmpl/1.6/Tue May  7 21:56:40 2002//TBUGZILLA-2_16_1
+/header.html.tmpl/1.5.2.7/Thu Jul  4 11:21:00 2002//TBUGZILLA-2_16_1
+/hidden-fields.html.tmpl/1.2.2.3/Tue Sep  3 07:25:01 2002//TBUGZILLA-2_16_1
+/message.html.tmpl/1.3/Mon May  6 19:17:11 2002//TBUGZILLA-2_16_1
+/select-menu.html.tmpl/1.1.2.1/Mon Jun  3 22:34:12 2002//TBUGZILLA-2_16_1
+/useful-links.html.tmpl/1.2.2.6/Wed Jul 10 00:06:00 2002//TBUGZILLA-2_16_1
+/user-error.html.tmpl/1.4/Mon May  6 19:17:12 2002//TBUGZILLA-2_16_1
 D
diff --git a/template/en/default/global/CVS/Tag b/template/en/default/global/CVS/Tag
index f2ec6389c..a82894094 100644
--- a/template/en/default/global/CVS/Tag
+++ b/template/en/default/global/CVS/Tag
@@ -1 +1 @@
-NBUGZILLA-2_16
+NBUGZILLA-2_16_1
diff --git a/template/en/default/global/hidden-fields.html.tmpl b/template/en/default/global/hidden-fields.html.tmpl
index e622e7b90..f968fab20 100644
--- a/template/en/default/global/hidden-fields.html.tmpl
+++ b/template/en/default/global/hidden-fields.html.tmpl
@@ -21,6 +21,8 @@
 
 [%# INTERFACE:
   # form: hash; the form fields/values for which to generate hidden fields.
+  # mform: hash; the form fields/values with multiple values for which to
+  #   generate hidden fields.
   # exclude: string; a regular expression matching fields to exclude
   #   from the list of hidden fields generated by this template
   #%]
@@ -28,6 +30,13 @@
 [%# Generate hidden form fields for non-excluded fields. %]
 [% FOREACH field = form %]
   [% NEXT IF exclude && field.key.search(exclude) %]
-  <input type="hidden" name="[% field.key %]"
-         value="[% field.value | html | html_linebreak %]">
+  [% IF mform.${field.key}.size > 1 %]
+    [% FOREACH mvalue = mform.${field.key} %]
+      <input type="hidden" name="[% field.key %]"
+             value="[% mvalue | html | html_linebreak %]">
+    [% END %]
+  [% ELSE %]
+    <input type="hidden" name="[% field.key %]"
+           value="[% field.value | html | html_linebreak %]">
+  [% END %]
 [% END %]
diff --git a/template/en/default/list/CVS/Entries b/template/en/default/list/CVS/Entries
index c00b54785..b6fadb0c1 100644
--- a/template/en/default/list/CVS/Entries
+++ b/template/en/default/list/CVS/Entries
@@ -1,9 +1,9 @@
-/change-columns.html.tmpl/1.3/Tue Apr 23 23:27:34 2002//TBUGZILLA-2_16
-/edit-multiple.html.tmpl/1.4.2.2/Sun Jun 30 04:24:57 2002//TBUGZILLA-2_16
-/list-rdf.rdf.tmpl/1.1/Thu Apr 18 18:56:55 2002//TBUGZILLA-2_16
-/list-simple.html.tmpl/1.4.2.1/Thu May 23 08:14:22 2002//TBUGZILLA-2_16
-/list.html.tmpl/1.3.2.2/Wed Jun  5 02:23:12 2002//TBUGZILLA-2_16
-/quips.html.tmpl/1.4.2.1/Thu May 23 08:14:23 2002//TBUGZILLA-2_16
-/server-push.html.tmpl/1.2/Mon May  6 19:17:19 2002//TBUGZILLA-2_16
-/table.html.tmpl/1.4.2.2/Mon Jul  1 03:30:23 2002//TBUGZILLA-2_16
+/change-columns.html.tmpl/1.3/Tue Apr 23 23:27:34 2002//TBUGZILLA-2_16_1
+/edit-multiple.html.tmpl/1.4.2.2/Sun Jun 30 04:24:57 2002//TBUGZILLA-2_16_1
+/list-rdf.rdf.tmpl/1.1/Thu Apr 18 18:56:55 2002//TBUGZILLA-2_16_1
+/list-simple.html.tmpl/1.4.2.1/Thu May 23 08:14:22 2002//TBUGZILLA-2_16_1
+/list.html.tmpl/1.3.2.2/Wed Jun  5 02:23:12 2002//TBUGZILLA-2_16_1
+/quips.html.tmpl/1.4.2.1/Thu May 23 08:14:23 2002//TBUGZILLA-2_16_1
+/server-push.html.tmpl/1.2/Mon May  6 19:17:19 2002//TBUGZILLA-2_16_1
+/table.html.tmpl/1.4.2.2/Mon Jul  1 03:30:23 2002//TBUGZILLA-2_16_1
 D
diff --git a/template/en/default/list/CVS/Tag b/template/en/default/list/CVS/Tag
index f2ec6389c..a82894094 100644
--- a/template/en/default/list/CVS/Tag
+++ b/template/en/default/list/CVS/Tag
@@ -1 +1 @@
-NBUGZILLA-2_16
+NBUGZILLA-2_16_1
diff --git a/template/en/default/reports/CVS/Entries b/template/en/default/reports/CVS/Entries
index 9b1c1b1e2..7a8aeb59d 100644
--- a/template/en/default/reports/CVS/Entries
+++ b/template/en/default/reports/CVS/Entries
@@ -1,6 +1,6 @@
-/components.html.tmpl/1.4.2.2/Thu May 30 19:38:22 2002//TBUGZILLA-2_16
-/duplicates-simple.html.tmpl/1.1/Fri Apr 26 23:18:53 2002//TBUGZILLA-2_16
-/duplicates-table.html.tmpl/1.1.2.2/Thu Jun 13 22:22:32 2002//TBUGZILLA-2_16
-/duplicates.html.tmpl/1.4.2.1/Thu May 23 08:14:26 2002//TBUGZILLA-2_16
-/keywords.html.tmpl/1.4/Wed Apr 24 18:27:43 2002//TBUGZILLA-2_16
+/components.html.tmpl/1.4.2.2/Thu May 30 19:38:22 2002//TBUGZILLA-2_16_1
+/duplicates-simple.html.tmpl/1.1/Fri Apr 26 23:18:53 2002//TBUGZILLA-2_16_1
+/duplicates-table.html.tmpl/1.1.2.2/Thu Jun 13 22:22:32 2002//TBUGZILLA-2_16_1
+/duplicates.html.tmpl/1.4.2.1/Thu May 23 08:14:26 2002//TBUGZILLA-2_16_1
+/keywords.html.tmpl/1.4/Wed Apr 24 18:27:43 2002//TBUGZILLA-2_16_1
 D
diff --git a/template/en/default/reports/CVS/Tag b/template/en/default/reports/CVS/Tag
index f2ec6389c..a82894094 100644
--- a/template/en/default/reports/CVS/Tag
+++ b/template/en/default/reports/CVS/Tag
@@ -1 +1 @@
-NBUGZILLA-2_16
+NBUGZILLA-2_16_1
diff --git a/template/en/default/search/CVS/Entries b/template/en/default/search/CVS/Entries
index 07eaa5551..5398bf950 100644
--- a/template/en/default/search/CVS/Entries
+++ b/template/en/default/search/CVS/Entries
@@ -1,5 +1,5 @@
-/boolean-charts.html.tmpl/1.1/Fri Apr 26 20:03:08 2002//TBUGZILLA-2_16
-/form.html.tmpl/1.2.2.5/Thu Jul 11 19:28:05 2002//TBUGZILLA-2_16
-/knob.html.tmpl/1.2.2.2/Sat Jun 22 23:56:00 2002//TBUGZILLA-2_16
-/search.html.tmpl/1.8.2.1/Tue Jun  4 22:56:40 2002//TBUGZILLA-2_16
+/boolean-charts.html.tmpl/1.1/Fri Apr 26 20:03:08 2002//TBUGZILLA-2_16_1
+/form.html.tmpl/1.2.2.5/Thu Jul 11 19:28:05 2002//TBUGZILLA-2_16_1
+/knob.html.tmpl/1.2.2.2/Sat Jun 22 23:56:00 2002//TBUGZILLA-2_16_1
+/search.html.tmpl/1.8.2.1/Tue Jun  4 22:56:40 2002//TBUGZILLA-2_16_1
 D
diff --git a/template/en/default/search/CVS/Tag b/template/en/default/search/CVS/Tag
index f2ec6389c..a82894094 100644
--- a/template/en/default/search/CVS/Tag
+++ b/template/en/default/search/CVS/Tag
@@ -1 +1 @@
-NBUGZILLA-2_16
+NBUGZILLA-2_16_1
diff --git a/userprefs.cgi b/userprefs.cgi
index 649008864..3a6a58463 100755
--- a/userprefs.cgi
+++ b/userprefs.cgi
@@ -67,7 +67,8 @@ sub DoAccount {
     $vars->{'realname'} = FetchSQLData();
 
     if(Param('allowemailchange')) {
-        SendSQL("SELECT tokentype, issuedate + INTERVAL 3 DAY, eventdata 
+        SendSQL("SELECT tokentype, DATE_ADD(issuedate,INTERVAL 3 DAY),
+                    eventdata 
                     FROM tokens
                     WHERE userid = $userid
                     AND tokentype LIKE 'email%' 
@@ -370,6 +371,9 @@ $vars->{'changes_saved'} = $::FORM{'dosave'};
 
 my $current_tab_name = $::FORM{'tab'} || "account";
 
+# The SWITCH below makes sure that this is valid
+trick_taint($current_tab_name);
+
 $vars->{'current_tab_name'} = $current_tab_name;
 
 # Do any saving, and then display the current tab.
@@ -393,6 +397,8 @@ SWITCH: for ($current_tab_name) {
         DoPermissions();
         last SWITCH;
     };
+    ThrowUserError("Unknown tab <code>" . html_quote($current_tab_name)
+                   . "</code>");
 }
 
 # Generate and return the UI (HTML page) from the appropriate template.
-- 
GitLab