Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
fc99fef1
Commit
fc99fef1
authored
Oct 15, 2010
by
Frédéric Buclin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 604522: t/012throwables.t doesn't catch new user errors correctly
r/a=mkanat
parent
e60d388f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
Auth.pm
Bugzilla/Auth.pm
+1
-1
DB.pm
Bugzilla/Auth/Verify/DB.pm
+2
-2
012throwables.t
t/012throwables.t
+3
-3
No files found.
Bugzilla/Auth.pm
View file @
fc99fef1
...
@@ -152,7 +152,7 @@ sub _handle_login_result {
...
@@ -152,7 +152,7 @@ sub _handle_login_result {
}
}
elsif
(
$fail_code
==
AUTH_ERROR
)
{
elsif
(
$fail_code
==
AUTH_ERROR
)
{
if
(
$result
->
{
user_error
})
{
if
(
$result
->
{
user_error
})
{
ThrowUserError
(
$result
->
{
error
},
$result
->
{
details
});
ThrowUserError
(
$result
->
{
user_
error
},
$result
->
{
details
});
}
}
else
{
else
{
ThrowCodeError
(
$result
->
{
error
},
$result
->
{
details
});
ThrowCodeError
(
$result
->
{
error
},
$result
->
{
details
});
...
...
Bugzilla/Auth/Verify/DB.pm
View file @
fc99fef1
...
@@ -76,8 +76,8 @@ sub check_credentials {
...
@@ -76,8 +76,8 @@ sub check_credentials {
# Force the user to type a longer password if it's too short.
# Force the user to type a longer password if it's too short.
if
(
length
(
$password
)
<
USER_PASSWORD_MIN_LENGTH
)
{
if
(
length
(
$password
)
<
USER_PASSWORD_MIN_LENGTH
)
{
return
{
failure
=>
AUTH_ERROR
,
error
=>
'password_current_too_short'
,
return
{
failure
=>
AUTH_ERROR
,
user_
error
=>
'password_current_too_short'
,
user_error
=>
1
,
details
=>
{
locked_user
=>
$user
}
};
details
=>
{
locked_user
=>
$user
}
};
}
}
# The user's credentials are okay, so delete any outstanding
# The user's credentials are okay, so delete any outstanding
...
...
t/012throwables.t
View file @
fc99fef1
...
@@ -117,7 +117,7 @@ foreach my $file (keys %test_modules) {
...
@@ -117,7 +117,7 @@ foreach my $file (keys %test_modules) {
# Bugzilla/Error.pm)
# Bugzilla/Error.pm)
$lineno
++
;
$lineno
++
;
if
(
$line
=~
if
(
$line
=~
/^[^#]*
(Throw(Code|User)Error|
error\s+=>)\s*\(?\s*["'](.*?)['"]/
)
{
/^[^#]*
\b(Throw(Code|User)Error|(user_)?
error\s+=>)\s*\(?\s*["'](.*?)['"]/
)
{
my
$errtype
;
my
$errtype
;
# If it's a normal ThrowCode/UserError
# If it's a normal ThrowCode/UserError
if
(
$2
)
{
if
(
$2
)
{
...
@@ -125,9 +125,9 @@ foreach my $file (keys %test_modules) {
...
@@ -125,9 +125,9 @@ foreach my $file (keys %test_modules) {
}
}
# If it's an AUTH_ERROR tag
# If it's an AUTH_ERROR tag
else
{
else
{
$errtype
=
'code'
;
$errtype
=
$3
?
'user'
:
'code'
;
}
}
my
$errtag
=
$
3
;
my
$errtag
=
$
4
;
push
@
{
$Errors
{
$errtype
}{
$errtag
}{
used_in
}{
$file
}},
$lineno
;
push
@
{
$Errors
{
$errtype
}{
$errtag
}{
used_in
}{
$file
}},
$lineno
;
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment