aqhome-cgi: use AQH_ModService_DenyRequest

this function redirects to the login page and then to the requested page.
This commit is contained in:
Martin Preuss
2026-05-29 17:22:12 +02:00
parent 03db148a3b
commit b8d2fc76eb
3 changed files with 68 additions and 23 deletions

View File

@@ -166,10 +166,8 @@ int _handleRequest(AQH_MODULE *m, AQCGI_REQUEST *rq, AQH_SESSION *session, const
if (strcasecmp(sLastPathElem, "index.html")==0) {
if (AQH_ModService_GetUserPerms(m) & (AQH_MODADM_PERMS_ADMINUSERS | AQH_MODADM_PERMS_ADMINMODULES))
rv=_handleRqIndex(m, rq, dbuf);
else {
AQCGI_Request_SetResponseCode(rq, 403);
AQCGI_Request_SetResponseText(rq, "Forbidden");
}
else
AQH_ModService_DenyRequest(m, rq, session, dbuf);
}
else {
AQCGI_Request_SetResponseCode(rq, 404);