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)

defect
Not set
normal

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
Whiteboard: [ws:need triage]
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
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'); }
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"
give me some minute and i will upload a video
please tell me when you have finished so i can delete the video
The video is private.
sorry please try no is unlisted
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.
Whiteboard: [ws:need triage] → [infrasec:access][ws:moderate]
(In reply to comment #7) > please tell me when you have finished so i can delete the video You can delete it. Thanks.
> Could someone please investigate our current configuration to see if ppass is our current password? clouserw ?
(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
ADMIN_SECRET in production is not ppass.
Also, the last time someone edited that file was Aug 31st, so the ADMIN_SECRET is at least that old.
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'
this is the problem change if (!$secret == ADMIN_SECRET) exit("Bad Secret"); to if ($secret != ADMIN_SECRET) exit("Bad Secret");
@Jeremy you right sorry for duplicate
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.
Oops, midaired with Ervis. Dupes all around!
Um, what is the final decision on the issue? Is the code wrong?
Status: UNCONFIRMED → NEW
Ever confirmed: true
The code is broken for sure.
Assignee: nobody → telliott
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.
(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?
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.
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?
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.
Recommend simply deleting this file.
done in r81951
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: [infrasec:access][ws:moderate] → [infrasec:access][ws:moderate][qa-]
Product: Websites → Websites Graveyard
Flags: sec-bounty+
Group: websites-security
You need to log in before you can comment on or make changes to this bug.