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
d33becc5
Commit
d33becc5
authored
Nov 17, 2002
by
myk%mozilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for bug 179494: prevents Bugzilla from thinking users have changed flags when they haven't.
r=bbaetz a=myk
parent
53f98dcc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
13 deletions
+30
-13
Flag.pm
Bugzilla/Flag.pm
+17
-7
User.pm
Bugzilla/User.pm
+13
-6
No files found.
Bugzilla/Flag.pm
View file @
d33becc5
...
...
@@ -312,16 +312,26 @@ sub modify {
my
$flag
=
get
(
$id
);
my
$status
=
$data
->
{
"flag-$id"
};
my
$requestee_email
=
$data
->
{
"requestee-$id"
};
# Ignore flags the user didn't change.
next
if
(
$status
eq
$flag
->
{
'status'
}
&&
$flag
->
{
'requestee'
}
&&
$requestee_email
eq
$flag
->
{
'requestee'
}
->
{
'email'
});
my
$requestee_email
=
&::
trim
(
$data
->
{
"requestee-$id"
});
# Ignore flags the user didn't change. A flag hasn't changed
# if its status and requestee remain the same. Status is easy;
# we just compare the existing status with the submitted one.
# For requestee, however, we have to be careful not to compare
# the two if the flag isn't specifically requestable or isn't
# being requested, otherwise we'll get false positives and think
# the user changed the flag when they didn't.
next
if
$status
eq
$flag
->
{
'status'
}
# the flag's status hasn't changed, and
&&
(
!
$flag
->
{
'is_requesteeble'
}
# the flag isn't specifically requestable, or
||
$status
ne
"?"
# the flag isn't being requested, or
||
(
$flag
->
{
'requestee'
}
# the requestee hasn't changed
&&
(
$requestee_email
eq
$flag
->
{
'requestee'
}
->
{
'email'
})));
# Since the status is validated, we know it's safe, but it's still
# tainted, so we have to detaint it before using it in a query.
&::
trick_taint
(
$status
);
if
(
$status
eq
'+'
||
$status
eq
'-'
)
{
&::
SendSQL
(
"UPDATE flags
SET setter_id = $::userid ,
...
...
Bugzilla/User.pm
View file @
d33becc5
...
...
@@ -314,8 +314,12 @@ sub match_field {
if
((
scalar
(
@
{
$users
})
==
1
)
&&
(
@
{
$users
}[
0
]
->
{
'email'
}
eq
$query
))
{
$vars
->
{
'form'
}
->
{
$field
}
.=
@
{
$users
}[
0
]
->
{
'email'
}
.
" "
;
push
@
{
$vars
->
{
'mform'
}
->
{
$field
}},
@
{
$users
}[
0
]
->
{
'email'
}
.
" "
;
# delimit with spaces if necessary
if
(
$vars
->
{
'form'
}
->
{
$field
})
{
$vars
->
{
'form'
}
->
{
$field
}
.=
" "
;
}
$vars
->
{
'form'
}
->
{
$field
}
.=
@
{
$users
}[
0
]
->
{
'email'
};
push
@
{
$vars
->
{
'mform'
}
->
{
$field
}},
@
{
$users
}[
0
]
->
{
'email'
};
next
;
}
...
...
@@ -324,10 +328,13 @@ sub match_field {
# here is where it checks for multiple matches
if
(
scalar
(
@
{
$users
})
==
1
)
{
# exactly one match
$vars
->
{
'form'
}
->
{
$field
}
.=
@
{
$users
}[
0
]
->
{
'email'
}
.
" "
;
push
@
{
$vars
->
{
'mform'
}
->
{
$field
}},
@
{
$users
}[
0
]
->
{
'email'
}
.
" "
;
if
(
scalar
(
@
{
$users
})
==
1
)
{
# exactly one match
# delimit with spaces if necessary
if
(
$vars
->
{
'form'
}
->
{
$field
})
{
$vars
->
{
'form'
}
->
{
$field
}
.=
" "
;
}
$vars
->
{
'form'
}
->
{
$field
}
.=
@
{
$users
}[
0
]
->
{
'email'
};
push
@
{
$vars
->
{
'mform'
}
->
{
$field
}},
@
{
$users
}[
0
]
->
{
'email'
};
$need_confirm
=
1
if
&::
Param
(
'confirmuniqueusermatch'
);
}
...
...
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