Revolution: HTTP_MODAUTH missing for modx.config.js.php in browser/index.tpl

Created on 18 May 2021  路  3Comments  路  Source: modxcms/revolution

Bug report

Summary

Some requests to modx.config.js.php with action=browser and wctx=web are missing the HTTP_MODAUTH parameter and thus return an access denied error (code 401).

Step to reproduce

  1. Log into the manager
  2. Do something that will open the media browser/picker dialog (i.e. try to insert an image with an RTE editor).

Observed behavior

A blank dialog is opened and the following JS error are thrown:

  • Uncaught SyntaxError: Unexpected token ':'
  • Uncaught TypeError: Cannot read property 'toLowerCase' of undefined
    at modx.jsgrps-min.js:formatted:9666
    at modx.jsgrps-min.js:formatted:10037
  • Uncaught TypeError: Cannot set property 'Default' of undefined
    at layout.js:1
  • ext-all.js:21 Uncaught TypeError: b[(d.xtype || e)] is not a constructor
    at Object.create (ext-all.js:21)
    at MODx.load (VM5550 modx.js:85)
    at index.php?a=browser&source=2&ctx=web&id=2814:88
    at ext-all.js:21
    at b (ext-all.js:21)

A request is made to modx.config.js.php which gets an access denied error response (code 401). Contrary to the modx.config.js.php request made in the initial page request it is missing an HTTP_MODAUTH parameter (apart from having a different action parameter which I assume to be intended).

Expected behavior

A working media browser/picker dialog should open where I can pick a media file.

Related issue(s)/PR(s)

I saw that the HTTP_MODAUTH parameter for the modx.config.js.php was introduced in the commit 0d89b7ff for the issue #15644.

Environment

MODX 2.8.2, mysql 5.7.28-nmm1-log, Google Chrome 90.0.4430.93 (x86_64)

bug

Most helpful comment

Thanks for the report. This was already fixed in #15692. You can test it out in the latest nightly releases of 2.8.3-dev available at https://modx.com/download/nightlies.

All 3 comments

Thanks for the report. This was already fixed in #15692. You can test it out in the latest nightly releases of 2.8.3-dev available at https://modx.com/download/nightlies.

@opengeek you was faster me on 5 seconds :)

Sorry, I forgot to check the closed issues. I applied the fix and it works. Amazing!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Ruslan-Aleev picture Ruslan-Aleev  路  3Comments

muzzwood picture muzzwood  路  4Comments

sottwell picture sottwell  路  3Comments

akimsullec picture akimsullec  路  4Comments

Ruslan-Aleev picture Ruslan-Aleev  路  4Comments