We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9648 ☆ A M B ☆
    • 91 Posts
    Quote from: opengeek at Sep 16, 2013, 07:37 AM
    By doing this, you are basically disabling all security checks on your site. If the validation that is supposed to be checked to ensure you have a valid request is bypassed by setting it server side on every request, you are circumventing MODX security.

    If someone cares to explore why the value being sent in the REQUEST is getting set to 0 in these environments, we can start to address the actual problem being experienced here.

    What kind of security? Where $_SERVER['HTTP_MODAUTH'] is denined in CORE? Nowhere.

    And i do not need code-access to create it. I can do this via AJAX. For example:
    var url = foo_connector_url;
    $.ajax({
        'url': url
    
        // set modAuth header
        ,beforeSend: function(xhr){xhr.setRequestHeader('modAuth', 'test-value');}
    });


    And i got $_SERVER['HTTP_MODAUTH'] == 'test-value';
    Where security???
      MODX Revolution expert
      Follow ME on Twitter | Feel free ask any question on MODX-club
      • 22303 MODX Staff
      • 10,725 Posts
      The value coming from the request has to match the user calculated site_id on the server. That's where the security is...
        • 9648 ☆ A M B ☆
        • 91 Posts
        Quote from: opengeek at Sep 16, 2013, 07:54 AM
        The value coming from the request has to match the user calculated site_id on the server. That's where the security is...
        So why we need compare it with site_id, if we can overwrite this? It`s unlogical. And it`s not securable. Why we compare both of $_SERVER['HTTP_MODAUTH'] and $_REQUEST['HTTP_MODAUTH'] with site_id (both overwritable) instead just compare $_REQUEST['HTTP_MODAUTH'] with site_id?
          MODX Revolution expert
          Follow ME on Twitter | Feel free ask any question on MODX-club
          • 18270
          • 68 Posts
          This issues has been sitting around now for a few months and I still don't see a solution listed here that I am confident with. OpenGeek has had some constructive arguments, but no concrete fix that I can see. I don't want to hack the security code without having that as advice from a more official source.

          This bug is also reported here
          http://tracker.modx.com/issues/9999

          But doesn't seem to be taken too seriously here either. What can we do to escalate this to get a real solution? I've still got a bunch of clients that were upgraded from 2.2.7 to 2.2.8 that repeatedly need to flush permissions, and re-login to save things. Very frustrating for them.
            • 22303 MODX Staff
            • 10,725 Posts
            Quote from: marcushouse at Sep 23, 2013, 01:09 AM
            This issues has been sitting around now for a few months and I still don't see a solution listed here that I am confident with. OpenGeek has had some constructive arguments, but no concrete fix that I can see. I don't want to hack the security code without having that as advice from a more official source.

            This bug is also reported here
            http://tracker.modx.com/issues/9999

            But doesn't seem to be taken too seriously here either. What can we do to escalate this to get a real solution? I've still got a bunch of clients that were upgraded from 2.2.7 to 2.2.8 that repeatedly need to flush permissions, and re-login to save things. Very frustrating for them.
            I don't know where you get the idea it is not taken seriously. As soon as someone can identify the source of the problem, we can then find a solution. So far, I have not been able to reproduce this on any environment I'm working with, so obviously, I have not been able to identify what is causing the problem.
              • 18270
              • 68 Posts
              Opengeek, certainly not accusing you or anyone of ignoring the problem. Just wanting to get the issue resolved. I know there has been a lot of constructive feedback. As you said though, it seems like it is more an issue of the MODx team not being able to reproduce the problem.

              What if I can provide access to a cPanel/MODx install or something like that so you can login and debug it. If I can set up a demo that is having the problem it would hopefully allow a little easier debugging for you?
                • 22303 MODX Staff
                • 10,725 Posts
                If anyone can identify any particular editing activities/patterns which are taken consistently before this problem appears, that might help narrow down what is actually triggering the problem.

                @marcushouse If you can consistently reproduce the problem with a user account in a specific install, I'll be glad to take a deeper look if you want to provide access. Though I would prefer someone to identify the problem in more detail themselves, so I can just fix it. Alas, we can't always have what we prefer. smiley
                  • 9102 ☆ A M B ☆
                  • 318 Posts
                  If anyone can identify any particular editing activities/patterns which are taken consistently before this problem appears
                  For us the problem has been very inconsistent so it's difficult to identify a pattern. However, it seems to most often happen when two people with the same level of access (full admin rights) are logged in at the same time, and one of them tries to edit and save a resource.
                    • 10927
                    • 15 Posts
                    For our company it has been inconsistent also, does seem to happen more when 2 people have full admin access, but I did a new 2.2.9 install and got the problem when I logged in the 2nd day of using that site and went to save resource and 'access denied'. I have also had it do the same in the gallery component when uploading files, doesn't say access denied but cant upload - then flush permissions and all good. I haven't had it happen twice on the same day on the same site, seems when you flush permissions it will work fine until you login again the next day or so.
                      • 9102 ☆ A M B ☆
                      • 318 Posts
                      It is entirely possible that the fact that two users are logged in is a red herring - I'm almost always logged in, and it's usually other users who get the error when they try to save a resource. It seems like it happens less frequently if I log out, but that might just be my perception.