File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -382,6 +382,16 @@ bool cWebem::CheckForAction(WebEmSession & session, request& req )
382
382
catch (...)
383
383
{
384
384
385
+ }
386
+ if ((req.uri [0 ] == ' /' ) && (m_webRoot.length () > 0 ))
387
+ {
388
+ // possible incorrect root reference
389
+ size_t q = req.uri .find (m_webRoot);
390
+ if (q != 0 )
391
+ {
392
+ std::string olduri = req.uri ;
393
+ req.uri = m_webRoot + olduri;
394
+ }
385
395
}
386
396
return true ;
387
397
}
@@ -431,6 +441,16 @@ bool cWebem::CheckForAction(WebEmSession & session, request& req )
431
441
{
432
442
433
443
}
444
+ if ((req.uri [0 ] == ' /' ) && (m_webRoot.length () > 0 ))
445
+ {
446
+ // possible incorrect root reference
447
+ size_t q = req.uri .find (m_webRoot);
448
+ if (q != 0 )
449
+ {
450
+ std::string olduri = req.uri ;
451
+ req.uri = m_webRoot + olduri;
452
+ }
453
+ }
434
454
435
455
return true ;
436
456
}
You can’t perform that action at this time.
0 commit comments