-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
This looks potentially dangerous:
$event->return = str_replace("{$this->subdomain}/", '', $event->return);
https://github.com/apeisa/Multisite/blob/master/Multisite.module#L74
A simple str_replace() will replace all occurrences of anything that looks like the sub-domain - I believe the correct thing to do here would be something along the lines of:
$event->return = substr($event->return, strlen($this->subdomain) + 1);
Also, I wonder, is Module::init() the right place to modify the $_GET['it'] superglobal? Aren't other modules (and the ProcessWire core itself) potentially initializing based on the "old" value prior to modification?
I'm vetting this module for use in a large multi-tenant site - have you used this module in production in a real multi-site scenario?
Thanks!
Metadata
Metadata
Assignees
Labels
No labels