Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

unsecure admin-area

#59

Hey, first I thought it't a bug of the dev-version, but I am able to access to /admin as a non-admin or non-registered user. Should be fixed soon :)

Reported by Johannes Schirge · May 18th, 2009 @ 03:44 PM

State: resolved
Milestone: 0.6

Activity

  1. Brian Jesse Hendrickson
    Brian Jesse Hendrickson
    • State changed from new to open

    yes can see the admin area but not make changes

    omb has a very good (though still new and buggy) centralized security model

    but yes, agreed, should not be able to see it at all

    May 18th, 2009 @ 03:52 PM

  2. Johannes Schirge
    Johannes Schirge

    Hmm...I just edited your first categorie on openmicroblogger.com/admin

    May 18th, 2009 @ 10:25 PM

  3. Brian Jesse Hendrickson
    Brian Jesse Hendrickson

    :-) ok I check it out right now

    May 18th, 2009 @ 10:26 PM

  4. Brian Jesse Hendrickson
    Brian Jesse Hendrickson

    insert these 4 lines at line 1508 of /db/library/dbscript/_functions.php

    if ( !( in_array( $request->action, $datamodel->allowed_methods, true )))

    $action = 'get';
    

    if (!($action == 'get'))

    return false;
    

    May 18th, 2009 @ 10:42 PM

  5. Brian Jesse Hendrickson
    Brian Jesse Hendrickson

    the public_resource() test is supposed to return true only for GET on a resource

    May 18th, 2009 @ 10:43 PM

  6. Brian Jesse Hendrickson
    Brian Jesse Hendrickson

    if you want to push the fix I will pull it from your git

    May 18th, 2009 @ 10:44 PM

  7. Brian Jesse Hendrickson
    Brian Jesse Hendrickson

    should have an $action = $request->action; before that too

    $action = $request->action;

    if ( !( in_array( $action, $datamodel->allowed_methods, true )))

    $action = 'get';
    

    if (!($action == 'get'))

    return false;
    

    May 18th, 2009 @ 10:48 PM

  8. Johannes Schirge
    Johannes Schirge

    Wow, that was really fast! :)
    Thank you, it works!

    May 18th, 2009 @ 10:53 PM

  9. Brian Jesse Hendrickson
    Brian Jesse Hendrickson

    glad you like it! :-)

    I can push it if you don't want to

    May 18th, 2009 @ 10:56 PM

  10. Johannes Schirge
    Johannes Schirge

    Oh, you can't visit the mainpage anymore without being logged in.

    If you fix that, you can push it :P

    May 18th, 2009 @ 10:59 PM

  11. Brian Jesse Hendrickson
    Brian Jesse Hendrickson

    fixed like this

    I will push

    $action = $request->action;

    if ( !( in_array( $action, $datamodel->allowed_methods, true )))

    $action = 'get';
    

    if (!($action == 'get' || $action == 'get'))

    return false;
    

    May 18th, 2009 @ 11:03 PM

  12. Brian Jesse Hendrickson
  13. Brian Jesse Hendrickson
    Brian Jesse Hendrickson

    are you sure? did you use the 5-line version? I can see home page not logged in

    May 18th, 2009 @ 11:05 PM

  14. Brian Jesse Hendrickson
    Brian Jesse Hendrickson

    $action = $request->action;

    if ( !( in_array( $action, $datamodel->allowed_methods, true )))

    $action = 'get';

    if (!($action == 'get'))

    return false;

    May 18th, 2009 @ 11:05 PM

  15. Johannes Schirge
    Johannes Schirge

    Okay, didn't get the 5 line version. now it works with your last post. Thanks! :)

    May 18th, 2009 @ 11:44 PM

  16. Brian Jesse Hendrickson
    Brian Jesse Hendrickson

    hi Johannes,

    I just committed all of your fixes, and the security fix too

    http://github.com/voitto/openmicroblogger/commits/master

    also posted a new dbscript.net/omb.zip

    thanks again for your help -brian

    May 19th, 2009 @ 12:05 AM

  17. Brian Jesse Hendrickson
    Brian Jesse Hendrickson
    • State changed from open to resolved

    May 19th, 2009 @ 12:05 AM

  18. Scot
    Scot

    Playing around in Identi.ca I noticed an old test account that is still listed by another Identi.ca user under "subscribers.

    While the link showed an old Sportstwit profile url (http://www.sportstwit.com/admin), it actually brought me to: http://openmicroblogger.com/admin.

    This can't be good,

    May 20th, 2009 @ 08:12 AM

  19. Brian Jesse Hendrickson
    Brian Jesse Hendrickson
    • State changed from resolved to open

    May 22nd, 2009 @ 12:24 AM

  20. Brian Jesse Hendrickson
    Brian Jesse Hendrickson

    Hi Scot,

    Could you do me a favor and look at the contents of the .htaccess file at SportsTwit.com

    My guess is that the 3rd line says "openmicroblogger.com"

    Thanks a lot

    -- Brian

    June 17th, 2009 @ 05:40 PM

  21. Johannes Schirge
    Johannes Schirge
    • Tag changed from admin-area, security-issue to medium-priority

    Is this still a problem?

    June 28th, 2009 @ 06:24 AM

  22. Johannes Schirge
    Johannes Schirge
    • State changed from open to resolved

    Okay, no one instead of the admin is able to access the admin menu anymore. Good thing :-)

    July 20th, 2009 @ 05:56 AM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.