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
672d7147
Commit
672d7147
authored
Mar 10, 2005
by
travis%sedsystems.ca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 282574 : use the new "auth_failure" error message for all authentication failures
Patch by Frederic Buclin <LpSolit@gmail.com> r=travis, wurblzap a=myk
parent
82bc36a9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
35 additions
and
35 deletions
+35
-35
attachment.cgi
attachment.cgi
+4
-3
buglist.cgi
buglist.cgi
+4
-1
doeditparams.cgi
doeditparams.cgi
+4
-6
quips.cgi
quips.cgi
+4
-3
sanitycheck.cgi
sanitycheck.cgi
+3
-1
user-error.html.tmpl
template/en/default/global/user-error.html.tmpl
+16
-21
No files found.
attachment.cgi
View file @
672d7147
...
...
@@ -204,9 +204,10 @@ sub validateID
# Make sure the user is authorized to access this attachment's bug.
(
$bugid
,
my
$isprivate
)
=
FetchSQLData
();
ValidateBugID
(
$bugid
);
if
((
$isprivate
>
0
)
&&
Param
(
"insidergroup"
)
&&
!
(
UserInGroup
(
Param
(
"insidergroup"
))))
{
ThrowUserError
(
"attachment_access_denied"
);
if
(
$isprivate
&&
Param
(
"insidergroup"
))
{
UserInGroup
(
Param
(
"insidergroup"
))
||
ThrowUserError
(
"auth_failure"
,
{
action
=>
"access"
,
object
=>
"attachment"
});
}
# XXX shim code, kill $::FORM
...
...
buglist.cgi
View file @
672d7147
...
...
@@ -73,7 +73,10 @@ my $dotweak = $::FORM{'tweak'} ? 1 : 0;
# Log the user in
if
(
$dotweak
)
{
Bugzilla
->
login
(
LOGIN_REQUIRED
);
UserInGroup
(
"editbugs"
)
||
ThrowUserError
(
"insufficient_privs_for_multi"
);
UserInGroup
(
"editbugs"
)
||
ThrowUserError
(
"auth_failure"
,
{
group
=>
"editbugs"
,
action
=>
"modify"
,
object
=>
"multiple_bugs"
});
GetVersionTable
();
}
else
{
...
...
doeditparams.cgi
View file @
672d7147
...
...
@@ -37,12 +37,10 @@ my $cgi = Bugzilla->cgi;
print
$cgi
->
header
();
if
(
!
UserInGroup
(
"tweakparams"
))
{
print
"<h1>Sorry, you aren't a member of the 'tweakparams' group.</h1>\n"
;
print
"And so, you aren't allowed to edit the parameters.\n"
;
PutFooter
();
exit
;
}
UserInGroup
(
"tweakparams"
)
||
ThrowUserError
(
"auth_failure"
,
{
group
=>
"tweakparams"
,
action
=>
"modify"
,
object
=>
"parameters"
});
PutHeader
(
"Saving new parameters"
);
...
...
quips.cgi
View file @
672d7147
...
...
@@ -119,9 +119,10 @@ if ($action eq 'approve') {
}
if
(
$action
eq
"delete"
)
{
if
(
!
UserInGroup
(
'admin'
))
{
ThrowUserError
(
"quips_edit_denied"
);
}
UserInGroup
(
"admin"
)
||
ThrowUserError
(
"auth_failure"
,
{
group
=>
"admin"
,
action
=>
"delete"
,
object
=>
"quips"
});
my
$quipid
=
$cgi
->
param
(
"quipid"
);
ThrowCodeError
(
"need_quipid"
)
unless
$quipid
=~
/(\d+)/
;
$quipid
=
$1
;
...
...
sanitycheck.cgi
View file @
672d7147
...
...
@@ -82,7 +82,9 @@ my $dbh = Bugzilla->dbh;
# prevents users with a legitimate interest in Bugzilla integrity
# from accessing the script).
UserInGroup
(
"editbugs"
)
||
ThrowUserError
(
"sanity_check_access_denied"
);
||
ThrowUserError
(
"auth_failure"
,
{
group
=>
"editbugs"
,
action
=>
"run"
,
object
=>
"sanity_check"
});
print
"Content-type: text/html\n"
;
print
"\n"
;
...
...
template/en/default/global/user-error.html.tmpl
View file @
672d7147
...
...
@@ -17,7 +17,7 @@
# Rights Reserved.
#
# Contributor(s): Gervase Markham <gerv@gerv.net>
# Frédéric Buclin <LpSoli
t@netscape.n
et>
# Frédéric Buclin <LpSoli
t@gmail.c
om>
#%]
[%# INTERFACE:
...
...
@@ -113,8 +113,10 @@
[% END %]
[% END %]
and so you aren't allowed to
[% IF action == "add" %]
[% IF group || reason %] and so [% END %] you are not authorized to
[% IF action == "access" %]
access
[% ELSIF action == "add" %]
add new
[% ELSIF action == "modify" %]
modify
...
...
@@ -122,13 +124,17 @@
delete
[% ELSIF action == "edit" %]
add, modify or delete
[% ELSIF action == "run" %]
run
[% ELSIF action == "schedule" %]
schedule
[% ELSIF action == "use" %]
use
[% END %]
[% IF object == "charts" %]
[% IF object == "attachment" %]
this attachment
[% ELSIF object == "charts" %]
the "New Charts" feature
[% ELSIF object == "classifications" %]
classifications
...
...
@@ -142,12 +148,18 @@
keywords
[% ELSIF object == "milestones" %]
milestones
[% ELSIF object == "multiple_bugs" %]
multiple [% terms.bugs %] at once
[% ELSIF object == "parameters" %]
parameters
[% ELSIF object == "products" %]
products
[% ELSIF object == "quips" %]
quips
[% ELSIF object == "reports" %]
whine reports
[% ELSIF object == "sanity_check" %]
a sanity check
[% ELSIF object == "user" %]
the user you specified
[% ELSIF object == "users" %]
...
...
@@ -156,10 +168,6 @@
versions
[% END %].
[% ELSIF error == "attachment_access_denied" %]
[% title = "Access Denied" %]
You are not authorized to access this attachment.
[% ELSIF error == "attachment_removed" %]
[% title = "Attachment Removed" %]
The attachment you are attempting to access has been removed.
...
...
@@ -548,11 +556,6 @@
[% ELSIF error == "insufficient_data_points" %]
We don't have enough data points to make a graph (yet).
[% ELSIF error == "insufficient_privs_for_multi" %]
[% title = "Insufficient Privileges" %]
Sorry, you do not have sufficient privileges to edit multiple
[% terms.bugs %].
[% ELSIF error == "invalid_attach_id" %]
[% title = "Invalid Attachment ID" %]
The attachment id [% attach_id FILTER html %] is invalid.
...
...
@@ -918,10 +921,6 @@
[% title = "Quips Disabled" %]
Quips are disabled.
[% ELSIF error == "quips_edit_denied" %]
[% title = "Permission Denied" %]
You do not have permission to edit quips.
[% ELSIF error == "reassign_to_empty" %]
[% title = "Illegal Reassignment" %]
To reassign [% terms.abug %], you must provide an address for
...
...
@@ -945,10 +944,6 @@
[% title = "Summary Needed" %]
You must enter a summary for this [% terms.bug %].
[% ELSIF error == "sanity_check_access_denied" %]
[% title = "Access Denied" %]
You do not have the permissions necessary to run a sanity check.
[% ELSIF error == "search_content_without_matches" %]
[% title = "Illegal Search" %]
The "content" field can only be used with "matches" search
...
...
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