[TikiWiki-commits] [Git][tikiwiki/tiki][30.x] [FIX] perms: Prevent endless perm denied redirect loop

"Jonny Bradley \(@jonnybradley\) via TikiWiki-cvs" <[email protected]> Tue, 30 Jun 2026 09:40:50 +0000
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <6a438f221a70e_383ad9c3027772@gitlab-sidekiq-low-urgency-cpu-bound-v2-656d6f88d7-49mb9.mail>

Jonny Bradley pushed to branch 30.x at Tiki Wiki CMS Groupware / Tiki


Commits:
8f3d51a7 by Jonny Bradley at 2026-06-30T09:40:40+00:00
[FIX] perms: Prevent endless perm denied redirect loop
---
* [FIX] perms: When permission is denied on a file gallery file we end up in an endless loop instead of getting redirected to tiki-login.php - seems `session_id()` can be empty when `$_SESSION` contains valid data (possibly happening since !9161?)

See merge request tikiwiki/tiki!10557


(cherry picked from commit 49e5f018e6d96159b745c9b5305b42800b6f2006)

c7d50f61 [FIX] perms: When permission is denied on a file gallery file we end up in an...

Co-authored-by: Jonny Bradley <[email protected]>
- - - - -


1 changed file:

- lib/tikiaccesslib.php


Changes:

=====================================
lib/tikiaccesslib.php
=====================================
@@ -1228,7 +1228,7 @@ class TikiAccessLib extends TikiLib
 
         if (trim($msg)) {
             $session = session_id();
-            if (empty($session)) {
+            if (empty($session) && empty($_SESSION['loginfrom'])) {
                 // Can happen if session_silent is enabled. But does any instance enable session_silent?
                 // Removing this case would allow removing the $msg parameters and just have callers using Feedback::add() before calling redirect(). Chealer 2017-08-16
                 $start = strpos($url, '?') ? '&' : '?';



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/8f3d51a7460a0741737249f71831ee27e6894378

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/8f3d51a7460a0741737249f71831ee27e6894378
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs