From: <var...@us...> - 2015-09-07 09:29:28
|
Revision: 9719 http://sourceforge.net/p/phpwiki/code/9719 Author: vargenau Date: 2015-09-07 09:29:25 +0000 (Mon, 07 Sep 2015) Log Message: ----------- Check MAX_PAGENAME_LENGTH in CreatePage Modified Paths: -------------- trunk/lib/InlineParser.php trunk/lib/plugin/CreatePage.php trunk/pgsrc/ReleaseNotes Modified: trunk/lib/InlineParser.php =================================================================== --- trunk/lib/InlineParser.php 2015-08-26 16:10:37 UTC (rev 9718) +++ trunk/lib/InlineParser.php 2015-09-07 09:29:25 UTC (rev 9719) @@ -332,7 +332,7 @@ $rawlink = preg_replace("/%2F(%20)+\./i", "%2F.", $rawlink); } } else { - // Check page name lenght + // Check page name length if (!string_starts_with($rawlink, "Upload:")) { if (strlen($rawlink) > MAX_PAGENAME_LENGTH) { return HTML::span(array('class' => 'error'), Modified: trunk/lib/plugin/CreatePage.php =================================================================== --- trunk/lib/plugin/CreatePage.php 2015-08-26 16:10:37 UTC (rev 9718) +++ trunk/lib/plugin/CreatePage.php 2015-09-07 09:29:25 UTC (rev 9719) @@ -71,6 +71,9 @@ if (!$s) { return $this->error(_("Cannot create page with empty name!")); } + if (strlen($s) > MAX_PAGENAME_LENGTH) { + return $this->error(_("Page name too long")); + } // TODO: javascript warning if "/" in s if ($verify) { $head = _("CreatePage failed"); Modified: trunk/pgsrc/ReleaseNotes =================================================================== --- trunk/pgsrc/ReleaseNotes 2015-08-26 16:10:37 UTC (rev 9718) +++ trunk/pgsrc/ReleaseNotes 2015-09-07 09:29:25 UTC (rev 9719) @@ -1,4 +1,4 @@ -Date: Thu, 20 Aug 2015 18:21:22 +0000 +Date: Mon, 7 Sep 2015 11:28:19 +0000 Mime-Version: 1.0 (Produced by PhpWiki 1.5.4) Content-Type: application/x-phpwiki; pagename=ReleaseNotes; @@ -12,6 +12,7 @@ * Fix tooltip translation in ~CreateToc plugin * Remove access keys +* Check MAX_PAGENAME_LENGTH in CreatePage == 1.5.4 2015-06-29 Marc-Etienne Vargenau == This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |