Description
The following line in /php/src/gadgets/ContainerConfig.php:
$contents = preg_replace('/[^http:\/\/|^https:\/\/]\/\/.$/m', '', preg_replace('@/\\*(?:.|\\n\\r)?
*/@', '', $contents));
attemps to parse comments out of container.js. However, container.js ships with a default setting of:
"gadgets.oauthGadgetCallbackTemplate" : "//%host%/gadgets/oauthcallback",
When run through the preg_replace lines above, this line is converted to:
"gadgets.oauthGadgetCallbackTemplate" :
which then breaks PHP's ability to parse container.js as a valid json string and throws a "Failed to json_decode the container configuration" exception.
Attachments
Issue Links
- is duplicated by
-
SHINDIG-1064 exception when json_decode container.js
- Resolved
- is related to
-
SHINDIG-980 Meaningless regular expression in ContainerConfig
- Resolved