[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] wiki: Prevent endless loop by ensuring a fallback for empty page slug

"Jonny Bradley \(@jonnybradley\) via TikiWiki-cvs" <[email protected]>
Newsgroups gmane.comp.cms.tiki.cvs
Message-ID <697657ceb20da_3b183d14726ad@gitlab-sidekiq-low-urgency-cpu-bound-v2-569b5f9d4f-qjg78.mail>

Jonny Bradley pushed to branch master at Tiki Wiki CMS Groupware / Tiki


Commits:
382358ea by Jonny Bradley at 2026-01-25T17:41:49+00:00
[FIX] wiki: Prevent endless loop by ensuring a fallback for empty page slug
---
* [FIX] wiki: Prevent endless loop by ensuring a fallback for empty page slug

See merge request tikiwiki/tiki!9403

- - - - -


1 changed file:

- lib/wiki/wikilib.php


Changes:

=====================================
lib/wiki/wikilib.php
=====================================
@@ -1677,6 +1677,10 @@ class WikiLib extends TikiLib
             if ($prefs['feature_sefurl'] === 'y') {
                 $tiki_pages = TikiDb::get()->table('tiki_pages');
                 $href = urlencode($tiki_pages->fetchOne('pageSlug', ['pageName' => $finalPageName]));
+                if (! $href) {
+                    // prevent endless loop if empty slug
+                    $href = $finalPageName;
+                }
             } else {
                 $href = "$view_script?page=" . urlencode($finalPageName);
             }



View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/382358ea93e8bb5b91d68592a76fb3e59aa062f2

-- 
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/382358ea93e8bb5b91d68592a76fb3e59aa062f2
You're receiving this email because of your account on gitlab.com.

_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.