Closed
Bug 619906
Opened 15 years ago
Closed 15 years ago
getpersonas.com placeholder_user.php create new user
Categories
(Websites Graveyard :: getpersonas.com, defect)
Websites Graveyard
getpersonas.com
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: ervistusha, Assigned: telliott)
References
()
Details
(Keywords: reporter-external, Whiteboard: [infrasec:access][ws:moderate][qa-])
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101206 Ubuntu/10.10 (maverick) Firefox/3.6.13
Build Identifier:
https://www.getpersonas.com/en-US/admin/placeholder_user.php
POST
secret=ppass&create_username=USERNAME
this will create new user
should add check if user has mod or admin right before add newuser
Reproducible: Always
Updated•15 years ago
|
Whiteboard: [ws:need triage]
Comment 1•15 years ago
|
||
Ervis,
It appears "ppass" is not the correct secret. I receive "Bad Secret" when attempting to send the post. Were you able to identify the correct secret code from the source or elsewhere?
Relevant Code:
Placeholder user code:
https://svn.mozilla.org/projects/getpersonas.com/production/server/admin/placeholder_user.php
Creates a placeholder user:
https://svn.mozilla.org/projects/getpersonas.com/production/server/lib/user.php
| Reporter | ||
Comment 2•15 years ago
|
||
Use hackbar firefox addons
URL:https://www.getpersonas.com/en-US/admin/placeholder_user.php
click on Enable Post data
Post data:secret=ppass&create_username=NEWUSERNAME
relevant data
https://svn.mozilla.org/projects/getpersonas.com/production/server/lib/personas_constants.php.dist
#salt for login cookie generation
if (!defined('PERSONAS_LOGIN_SALT')) { define('PERSONAS_LOGIN_SALT', 'OurSalt'); }
#password to access the readlog portion of the site
if (!defined('ADMIN_SECRET')) { define('ADMIN_SECRET', 'ppass'); }
Comment 3•15 years ago
|
||
Could you actually create a new user? It returns "bad secret" everytime I try to use "ppass". Based on the code, its possible the "ADMIN_SECRET" was defined elsewhere in a configuration file and the value is different than "ppass"
| Reporter | ||
Comment 4•15 years ago
|
||
give me some minute and i will upload a video
| Reporter | ||
Comment 5•15 years ago
|
||
Comment 6•15 years ago
|
||
| Reporter | ||
Comment 7•15 years ago
|
||
please tell me when you have finished so i can delete the video
Comment 8•15 years ago
|
||
The video is private.
| Reporter | ||
Comment 9•15 years ago
|
||
sorry please try no is unlisted
Comment 10•15 years ago
|
||
I viewed the video and it appears Ervis was able to create new placeholder
users. I however cannot reproduce this issue. Could someone please
investigate our current configuration to see if ppass is our current password?
Remediation:
If possible, remove the "secret" setup and simply add this as a functionality
for a logged in admin user.
Updated•15 years ago
|
Whiteboard: [ws:need triage] → [infrasec:access][ws:moderate]
Comment 11•15 years ago
|
||
(In reply to comment #7)
> please tell me when you have finished so i can delete the video
You can delete it. Thanks.
Comment 12•15 years ago
|
||
> Could someone please investigate our current configuration to see if ppass is our current password?
clouserw ?
Comment 13•15 years ago
|
||
(In reply to comment #12)
> > Could someone please investigate our current configuration to see if ppass is our current password?
>
> clouserw ?
I don't have access. -> oremj
Comment 14•15 years ago
|
||
ADMIN_SECRET in production is not ppass.
Comment 15•15 years ago
|
||
Also, the last time someone edited that file was Aug 31st, so the ADMIN_SECRET is at least that old.
Comment 16•15 years ago
|
||
This is a code issue:
if (!$secret == ADMIN_SECRET)
exit("Bad Secret");
That's not the same as:
if ($secret != ADMIN_SECRET)
Test case:
curl -d 'secret=foobar' 'https://www.getpersonas.com/en-US/admin/placeholder_user.php'
| Reporter | ||
Comment 17•15 years ago
|
||
this is the problem
change
if (!$secret == ADMIN_SECRET)
exit("Bad Secret");
to
if ($secret != ADMIN_SECRET)
exit("Bad Secret");
| Reporter | ||
Comment 18•15 years ago
|
||
@Jeremy you right sorry for duplicate
Comment 19•15 years ago
|
||
I'm pretty sure:
if (!$secret == ADMIN_SECRET)
parses to !$secret :
if ((!$secret) == ADMIN_SECRET)
If $secret is null that means !$secret is true and true == "astring" is always true.
If $secret contains anything $secret will be false and false == "astring" is always false.
Comment 20•15 years ago
|
||
Oops, midaired with Ervis. Dupes all around!
Comment 21•15 years ago
|
||
Um, what is the final decision on the issue? Is the code wrong?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 22•15 years ago
|
||
The code is broken for sure.
Updated•15 years ago
|
Assignee: nobody → telliott
| Assignee | ||
Comment 23•15 years ago
|
||
The code is definitely wrong.
That being said, unless we're still trying to do some level of synchronization with the Personas China instance, I believe the correct thing to do is just to pull this code entirely.
Comment 24•15 years ago
|
||
(In reply to comment #23)
> The code is definitely wrong.
>
> That being said, unless we're still trying to do some level of synchronization
> with the Personas China instance, I believe the correct thing to do is just to
> pull this code entirely.
Do you know who was managing the personas china stuff?
| Assignee | ||
Comment 25•15 years ago
|
||
My contact two years ago was Bin Sun, but he doesn't show up in phonebook.
I'd be astonished if that were being used. A quick grep through the logs should be sufficient to figure it out.
Comment 26•15 years ago
|
||
1) why is there an admin script that allows access to people who are not logged in as an admin?
2) are there any other such "admin" scripts?
| Assignee | ||
Comment 27•15 years ago
|
||
1) There was a very complicated relationship between Personas China and the main Personas. As part of that, we were asked to give them a way to 'reserve' usernames on the main servers in real-time so that there wouldn't be conflicts between usernames on the two portals.
2) That's the only one I set up for China. There's an 18-month gap since then that I can't really say anything about. The contents of the admin directory all appear accounted for, though.
| Assignee | ||
Comment 28•15 years ago
|
||
Recommend simply deleting this file.
Comment 29•15 years ago
|
||
done in r81951
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: [infrasec:access][ws:moderate] → [infrasec:access][ws:moderate][qa-]
Updated•13 years ago
|
Product: Websites → Websites Graveyard
Updated•13 years ago
|
Flags: sec-bounty+
Updated•9 years ago
|
Group: websites-security
Updated•2 years ago
|
Keywords: reporter-external
You need to log in
before you can comment on or make changes to this bug.
Description
•