We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13735
    • 62 Posts
    http://svn.modxcms.com/jira/browse/MODX-1776

    I’ve added this as an improvement in jira.
    • Connectors for front-end stuff should be implemented in the front-end as Resources so they can be properly protected.
        • 13735
        • 62 Posts
        Okay from this perspective this makes sense. But it should be mentioned in the manual. It should also be mentioned more explicitly that connectors are for the manager only. I didn’t know that before I started this topic.
          • 28215
          • 4,149 Posts
          Quote from: jbjoe at Mar 23, 2010, 01:47 PM

          Okay from this perspective this makes sense. But it should be mentioned in the manual. It should also be mentioned more explicitly that connectors are for the manager only. I didn’t know that before I started this topic.

          Yeah, we havent been clear on that.

          Ideally, in Revolution 2.1 and onward, the ’mgr’ context will just be a collection of Resources that behave exactly like the ’web’ context, serving up manager pages through mgr Snippets and connecting back to processors through a connector Resource that just feeds back JSON. That can be done, technically, now, but we were in the process of transition from Evolution - hence the connectors/ directory currently. It’s an intermediary step until 2.1.
            shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
            • 13735
            • 62 Posts
            This sounds much like MODx!
              • 44659
              • 20 Posts
              I know i'm refreshing this veeery old topic, but i'm wondering is there still problem with using connectors with other, than mgr context (in MODx Revo 2.3.1)? Is there any danger of using connectors that way? I'm using
              ?ctx=web
              and seems to work propertly.

              Maybe i'll explain what is my point: I'm using mgr, web and also third context, let's call it "restricted", to create front-end manager-like system based on bootstrap framework. All access for restricted-system users is based on MODx ACLs assigned to "restricted" context and my custom permissions for each usergroup. All operations (getting data, setting data, saving,deleting etc.) are based on AJAX requests. Checking permissions is made in each processor file by
              $modx->hasPermission(); 


              I considered the use of simple resource (gateway), but using processors for this job seemed to be less complicated (cuz i can run processor as AJAX request and by
              $modx->runProcessor()
              function).

              So, can they be any security problems? Excluding wrong ACLs and permissions settings of course (there are on my head) smiley

              P.S.: Better ideas for solving this problem are indicated, but mainly i'm curious is my thinking is right.
              P.S.2: and sorry, but english isn't my primary language smiley

              Regards

              EDIT: This part
              ?ctx=web
              is however bad idea - there is possibility to change that into mgr and it can give unexpected security problems. Better idea is to declare
              $_REQUEST['ctx']='restricted';
              in connector file, so every time it overwrite incoming context into the right one smiley

              But what about my question anyway? smiley [ed. note: jacqbus last edited this post 9 years, 6 months ago.]