Bugzilla – Attachment 82628 Details for
Bug 17006
Add route to change patron's password (authenticated)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17006: (follow-up) Whitespace chars follow-up
Bug-17006-follow-up-Whitespace-chars-follow-up.patch (text/plain), 2.38 KB, created by
Tomás Cohen Arazi (tcohen)
on 2018-11-24 12:42:55 UTC
(
hide
)
Description:
Bug 17006: (follow-up) Whitespace chars follow-up
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2018-11-24 12:42:55 UTC
Size:
2.38 KB
patch
obsolete
>From d6737f1de76cf89ec2ff74e9438d2b96ce3778a4 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 14 Sep 2018 16:28:12 -0700 >Subject: [PATCH] Bug 17006: (follow-up) Whitespace chars follow-up > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/REST/V1/Patrons/Password.pm | 5 ++--- > t/db_dependent/api/v1/patrons_password.t | 4 ++-- > 2 files changed, 4 insertions(+), 5 deletions(-) > >diff --git a/Koha/REST/V1/Patrons/Password.pm b/Koha/REST/V1/Patrons/Password.pm >index 35f51dd26b..9f3f2b063b 100644 >--- a/Koha/REST/V1/Patrons/Password.pm >+++ b/Koha/REST/V1/Patrons/Password.pm >@@ -100,11 +100,10 @@ sub set { > length => $password_length, min_length => $min_length ); > } > elsif ( $error eq 'has_whitespaces' ) { >- Koha::Exceptions::Password::TrailingWhitespaces->throw( >- "Password contains trailing spaces, which is forbidden."); >+ Koha::Exceptions::Password::WhitespaceCharacters->throw(); > } > elsif ( $error eq 'too_weak' ) { >- Koha::Exceptions::Password::TooWeak->throw("Password is too weak"); >+ Koha::Exceptions::Password::TooWeak->throw(); > } > } > >diff --git a/t/db_dependent/api/v1/patrons_password.t b/t/db_dependent/api/v1/patrons_password.t >index 0443354ed1..49aa8fbba9 100644 >--- a/t/db_dependent/api/v1/patrons_password.t >+++ b/t/db_dependent/api/v1/patrons_password.t >@@ -78,7 +78,7 @@ subtest 'set_password() (authorized user tests)' => sub { > > $tx->req->cookies( { name => 'CGISESSID', value => $session->id } ); > $tx->req->env( { REMOTE_ADDR => '127.0.0.1' } ); >- $t->request_ok($tx)->status_is(400)->json_is({ error => 'Password contains trailing spaces, which is forbidden.' }); >+ $t->request_ok($tx)->status_is(400)->json_is({ error => '[Password contains leading/trailing whitespace character(s)]' }); > > $new_password = 'abcdefg'; > $tx >@@ -98,7 +98,7 @@ subtest 'set_password() (authorized user tests)' => sub { > > $tx->req->cookies( { name => 'CGISESSID', value => $session->id } ); > $tx->req->env( { REMOTE_ADDR => '127.0.0.1' } ); >- $t->request_ok($tx)->status_is(400)->json_is({ error => 'Password is too weak' }); >+ $t->request_ok($tx)->status_is(400)->json_is({ error => '[Password is too weak]' }); > > $new_password = 'ABcde123%&'; > $tx >-- >2.19.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17006
:
54575
|
54576
|
54629
|
54630
|
54716
|
54717
|
54718
|
56155
|
56156
|
56157
|
56158
|
56283
|
56284
|
56399
|
56400
|
56401
|
56409
|
57356
|
57357
|
57358
|
57359
|
57360
|
63329
|
63330
|
63331
|
63332
|
63333
|
67128
|
67129
|
67130
|
67131
|
67132
|
70260
|
70261
|
70262
|
70263
|
70264
|
77882
|
77883
|
77884
|
77923
|
77924
|
77925
|
78837
|
82625
|
82626
|
82627
|
82628
|
83579
|
83580
|
83581
|
83749
|
83750
|
83751
|
84285
|
84286
|
84287
|
84488