Jump to:

23490 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » So sick of this error!!

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2
Go to End
Author Topic: 2878 Views
  • UncleCheese
    Avatar
    4085 Posts

    Re: So sick of this error!! Link to this post

    Yeah, that character has changed the way I code.

    Glad I posted this.. This problem plagued me for over a year.

  • Artyom
    Avatar
    Community Member
    22 Posts

    Re: So sick of this error!! Link to this post

    This bug *might* also be responsible for odd login behavior and an add cookie / security issue that I've never seen before. When an end user is (incorrectly) given a url to something they shouldn't have access to, like a "?stage=Stage" URL, they try to hit it. After that point they cannot hit *any* page at all on the live site, without SS first trying to authenticate them. crazy! has anyone seen this before??

    My client sent a newsletter out to 800 some people with bad URL's and now no one that clicked on them can see the site without clearing thier cookies. grr

    [EDIT]
    with some help from simon_w and others on IRC, here's what fixed it:

    in init()

       public function init()
       {
          if( Session::get('loggedInAs') == null ) {
             Versioned::reset();
          }
          parent::init();
       }

    So basically, calling a url with ?stage=Stage sets some cookies, so that links work when your browsing the stage site. THat is desired. But in my edge case, that resulted in users repeatedly being authenticated even for ordinary urls. I'm not sure why code like this wouldn't be in core. Does anyone think I should file a bug? thoughts?

    2878 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.