Fix url rewriting
Only apply pathTranslation if a path hasn't been rewritten (they're always relative paths), or if the rewritten path didn't begin with '/'.
Esse commit está contido em:
@@ -234,10 +234,14 @@ bool RequestURI::virtualFileExists(const VirtualHost *vhost,
|
||||
AttachString);
|
||||
if (!vhost->getDocumentRoot().empty()) {
|
||||
string fullname = canon.data();
|
||||
while (fullname[0] == '/') {
|
||||
fullname = fullname.substr(1);
|
||||
int i = 0;
|
||||
while (i < fullname.size() && fullname[i] == '/') ++i;
|
||||
if (i) {
|
||||
fullname = fullname.substr(i);
|
||||
}
|
||||
if (!i || !m_rewritten) {
|
||||
fullname = pathTranslation + fullname;
|
||||
}
|
||||
fullname = pathTranslation + fullname;
|
||||
m_path = fullname;
|
||||
m_absolutePath = String(sourceRoot) + m_path;
|
||||
processExt();
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário