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
aefeff9d
Commit
aefeff9d
authored
Aug 30, 2002
by
preed%sigkill.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 165221: Apostrophes not properly handled during account creation. r=joel,r2=bbaetz
parent
4c1922a6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
createaccount.cgi
createaccount.cgi
+0
-1
globals.pl
globals.pl
+10
-2
No files found.
createaccount.cgi
View file @
aefeff9d
...
...
@@ -65,7 +65,6 @@ if (defined($login)) {
# We've been asked to create an account.
my
$realname
=
trim
(
$::FORM
{
'realname'
});
CheckEmailSyntax
(
$login
);
trick_taint
(
$login
);
$vars
->
{
'login'
}
=
$login
;
if
(
!
ValidateNewUser
(
$login
))
{
...
...
globals.pl
View file @
aefeff9d
...
...
@@ -552,11 +552,19 @@ sub ValidateNewUser {
return
0
;
}
my
$sqluname
=
SqlQuote
(
$username
);
# Reject if the new login is part of an email change which is
# still in progress
#
# substring/locate stuff: bug 165221; this used to use regexes, but that
# was unsafe and required weird escaping; using substring to pull out
# the new/old email addresses and locate() to find the delimeter (':')
# is cleaner/safer
SendSQL
(
"SELECT eventdata FROM tokens WHERE tokentype = 'emailold'
AND eventdata like '%:$username'
OR eventdata like '$username:%'"
);
AND SUBSTRING(eventdata, 1, (LOCATE(':', eventdata) - 1)) = $sqluname
OR SUBSTRING(eventdata, (LOCATE(':', eventdata) + 1)) = $sqluname"
);
if
(
my
(
$eventdata
)
=
FetchSQLData
())
{
# Allow thru owner of token
if
(
$old_username
&&
(
$eventdata
eq
"$old_username:$username"
))
{
...
...
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