authscript ignore/return URLs

13 views
Skip to first unread message

Wouter Hendriks

unread,
Nov 13, 2021, 6:05:52 AM11/13/21
to General WebHare developers discussion
In most "check auth" (webrule authscript) I eventually have to write something like

```
STRING url := GetRequestURL();
IF (url LIKE "*/.ap/*"
    OR url LIKE "*/.uc/*"
    OR url LIKE "*/.publisher/*"
    OR url LIKE "*/wh_services/*"
    OR url LIKE "*.wrd/auth/restoresession.shtml*")
  RETURN;
```

to prevent all kinds of redirect loops. This cannot be the best solution, can it? :-)

Arnold Hendriks

unread,
Nov 14, 2021, 4:58:03 AM11/14/21
to General WebHare developers discussion
nope, as an access check like this could be skipped by simply appending ?/.ap/ to any URL protected by it

The best solution would probably be not to attempt to run authentication inside the URL you're trying to protect. Protect "/admin/" not "/", or run the authentication on a different hostname (ie that's how WebHare's access rules solve it - the authentication process runs on a different host). 

Arnold Hendriks

unread,
Aug 15, 2025, 6:32:57 AMAug 15
to General WebHare developers discussion
BTW: We have IsWHSafePublicEndpoint nowadays to find which URLs  should pass
Reply all
Reply to author
Forward
0 new messages