1
0

Fix regexp in functions_routing.incx.php

See .

I don't understand the code either (I don't even see
where this code path belongs to - do we have a
facitlity to show comments "from ... to"?), but
the current regexp is obviously wrong, and the
one suggested by @hannob is obviously
(syntactically) correct, so it should be no
problem to change that.

Fixes .

Signed-off-by: Thomas Hochstein <thh@inter.net>
This commit is contained in:
Thomas Hochstein
2020-03-27 16:47:49 +01:00
parent 6ad0f0514f
commit b446e6333f
2 changed files with 3 additions and 1 deletions

@ -1,6 +1,8 @@
Version 2.3.5-beta1 ()
------------------------------------------------------------------------
* Fix: Regular expression in functions_routing.incx.php
* Fix: Truncate extension of media items to 5 chars (which ist the
max length of the corresponding database field).
Thanks to @mmitch!

@ -78,7 +78,7 @@ function serveComments() {
continue;
}
if (preg_match('@^(last|f|t|from|to)[\s_-]*([\d-/ ]+)$@', strtolower(urldecode($v)), $m)) {
if (preg_match('@^(last|f|t|from|to)[\s_-]*([\d/ -]+)$@', strtolower(urldecode($v)), $m)) {
if ($m[1] == 'last') {
$usetime = time() - ($m[2]*86400);
$serendipity['GET']['commentStartTime'] = $usetime;