We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    Quote from: OpenGeek at Sep 18, 2009, 11:05 PM

    This is actually a security issue that I’m working on right now; basically, the web Context is delivered with an Access Control assigned to the Administrator user group.
    . . .
    This will be resolved in the default installation before the first Release Candidate.

    Can you tell me what the solution will be?
      Did I help you? Buy me a beer
      Get my Book: MODX:The Official Guide
      MODX info for everyone: http://bobsguides.com/modx.html
      My MODX Extras
      Bob's Guides is now hosted at A2 MODX Hosting
      • 22303 MODX Staff
      • 10,725 Posts
      Quote from: BobRay at Apr 14, 2010, 10:45 PM

      Quote from: OpenGeek at Sep 18, 2009, 11:05 PM

      This is actually a security issue that I’m working on right now; basically, the web Context is delivered with an Access Control assigned to the Administrator user group.
      . . .
      This will be resolved in the default installation before the first Release Candidate.

      Can you tell me what the solution will be?
      Didn’t find one; we need that access control to prevent unauthenticated management from the web context.
        • 9849
        • 74 Posts
        I created a permission "load" and granted that to context web. That did not help. Then I deleted the permission "Administrator" which did not change anything either.
          • 22303 MODX Staff
          • 10,725 Posts
          Quote from: florian.l at Apr 15, 2010, 10:06 AM

          I created a permission "load" and granted that to context web. That did not help. Then I deleted the permission "Administrator" which did not change anything either.
          You have to flush permissions (to see them yourself) or flush all sessions (for all users on the system to see them) after making such changes.
            • 9849
            • 74 Posts
            Quote from: OpenGeek at Apr 15, 2010, 01:30 PM

            You have to flush permissions (to see them yourself) or flush all sessions (for all users on the system to see them) after making such changes.

            I forgot to mention I allready did that, sorry. Still no changes. What makes me wonder, is that I can create a link to a resource via [[~X]], but cannot list resources with Ditto or GetResources.
              • 22303 MODX Staff
              • 10,725 Posts
              Quote from: florian.l at Apr 16, 2010, 02:51 AM

              Quote from: OpenGeek at Apr 15, 2010, 01:30 PM

              You have to flush permissions (to see them yourself) or flush all sessions (for all users on the system to see them) after making such changes.

              I forgot to mention I allready did that, sorry. Still no changes. What makes me wonder, is that I can create a link to a resource via [[~X]], but cannot list resources with Ditto or GetResources.
              It works for me when I follow all the instructions for running subdomains as virtual hosts or for using the plugin. You "HAVE" to set all settings for the URLs though, including site_url, http_host, and base_url (if applicable) in all contexts. including web.
                • 9849
                • 74 Posts
                I don’t know what I am doing wrong.

                I have been reading and following the this simple guide, which I think has been created with your help! One exception: My "site_url"s all end with a "/".

                For even tried to use the One Gateway Plugin but that seems to brake something in the manager, as it says "logged in as" and nothing more. Not "logged in as admin". Besides that, it does not redirect to the right context.

                If I switch to friendly URLs and keep the container_suffix at "/" the server does neither load external css nor images, although the path is correct. If I switch container_suffix to ".html" everything gets loaded. Does that has to do something with the problem?

                Some stats:
                MODx Revolution 2.0.0-rc-1
                Friendly URLs ON
                PHP 5.2.11
                MySQL 5.1.39
                Apache 2

                So sorry for bothering you!
                  • 18654
                  • 191 Posts
                  Can you post your plugin code?
                    God does not save those who are only imaginary sinners. Be a sinner, and let your sins be strong, but let your trust in Christ be stronger, and rejoice in Christ who is the victor over sin, death, and the world.
                    • 22303 MODX Staff
                    • 10,725 Posts
                    Quote from: florian.l at Apr 16, 2010, 09:51 AM

                    I don’t know what I am doing wrong.
                    I don’t either. wink

                    Quote from: florian.l at Apr 16, 2010, 09:51 AM

                    I have been reading and following the this simple guide, which I think has been created with your help! One exception: My "site_url"s all end with a "/".
                    All site_url settings must include the base_url, which always ends in / -- so you are correct. And I didn’t help anyone create the tutorial.

                    Quote from: florian.l at Apr 16, 2010, 09:51 AM

                    For even tried to use the One Gateway Plugin but that seems to brake something in the manager, as it says "logged in as" and nothing more. Not "logged in as admin". Besides that, it does not redirect to the right context.
                    Let’s explore one technique or the other fully before switching between them. They work in completely different ways. And it should have nothing to do with the manager or displaying the logged in user’s name. huh

                    Quote from: florian.l at Apr 16, 2010, 09:51 AM

                    If I switch to friendly URLs and keep the container_suffix at "/" the server does neither load external css nor images, although the path is correct. If I switch container_suffix to ".html" everything gets loaded. Does that has to do something with the problem?
                    Do you understand how Friendly URLs work in Revolution? Sounds to me like you are confused on how to access containers (container_suffix is appended) vs. non-containers (content type extension is appended).
                      • 9849
                      • 74 Posts
                      Ok, to make shure I do everything right, here is what I did today:

                      0. Assigned 3 domains to the same httpdocs
                      1. Installed a plain MODx Revo RC-1
                      2. Created 2 context (SiteA, SiteB)
                      3. Added the following context settings to web, SiteA, SiteB

                      • site_url (http://www.SiteA.de/)
                      • base_url (/)
                      • http_host (www.SiteA.de)
                      • site_start (ID of a resource inside the corresponding context)
                      4. Installed the OneGatewayPlugin and registered it with "OnHandleRequest"
                      <?php
                      switch ($modx->getOption('http_host')) {
                         case 'www.SiteA.de:80':
                         case 'www.SiteA.de':
                            $modx->switchContext('SiteA');
                            break;
                         case 'www.SiteB.de:80':
                         case 'www.SiteB.de':
                            $modx->switchContext('SiteB');
                            break;
                         default:
                            break;
                      }
                      

                      6. Downloaded and installed GetResources snippet via package management
                      7. Created a container (ID 3) with varouis dummy resources inside in context web.
                      8. Created a resource in SiteA with the content
                      [[GetResources? &parents=`3`]]

                      9. Flushed all Permissions
                      10. Typed www.SiteA.de in browser

                      Problems:
                      1. I am not beeing redirected to site_start of SiteA
                      UPDATE: It works if I supstitute "$modx->getOption(’http_host’)" with "$_SERVER[’HTTP_HOST’]"

                      2. Manager does not show my username anymore as soon as I activate the OneGateway plugin (after logging in again)
                      UPDATE: Seems to be working now. Must have been some kind of caching problem?!

                      3. I cannot access resources in web via [[GetResources]] (see 9). Stil I can create links to them.