diff options
author | Dylan William Hardison <dylan@hardison.net> | 2017-09-25 20:14:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-25 20:14:31 +0200 |
commit | 94d888356469f2d920835f9c6d4eba944e429f62 (patch) | |
tree | a4a123f21ae538261bf53d3593e12fb8d1a3d26b /t | |
parent | d827379894e2a5415cdbbb6b30aad0448ba82fb0 (diff) | |
download | bugzilla-94d888356469f2d920835f9c6d4eba944e429f62.tar.gz bugzilla-94d888356469f2d920835f9c6d4eba944e429f62.tar.xz |
Bug 1401463 - In bugzilla "you must reset password" state, all bug pages are force-redirected to password reset page, which loses "to-do" information that I have encoded as open tabs viewing particular bug pages
Diffstat (limited to 't')
-rw-r--r-- | t/hash-sig.t | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/t/hash-sig.t b/t/hash-sig.t new file mode 100644 index 000000000..30d3098d4 --- /dev/null +++ b/t/hash-sig.t @@ -0,0 +1,24 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# +# This Source Code Form is "Incompatible With Secondary Licenses", as +# defined by the Mozilla Public License, v. 2.0. +use strict; +use warnings; +use 5.10.1; +use lib qw( . lib local/lib/perl5 ); +use Bugzilla::Util qw(generate_random_password); +use Bugzilla::Token qw(issue_hash_sig check_hash_sig); +use Test::More; + +my $localconfig = { site_wide_secret => generate_random_password(256) }; +{ + package Bugzilla; + sub localconfig { $localconfig } +} + +my $sig = issue_hash_sig("hero", "batman"); +ok(check_hash_sig("hero", $sig, "batman"), "sig for batman checks out"); + +done_testing();
\ No newline at end of file |