summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2019-04-04 14:46:07 +0200
committerUrban Müller2019-04-04 14:46:07 +0200
commit6a24a37e8e203ff0f7700fea0a3792dd387dc401 (patch)
treea1fe3c76d78e12724b7ce938becfc4069666b4ab
parentaf3fa671c551d25fcf29762e8e46fe4173b0514e (diff)
downloaditools-6a24a37e8e203ff0f7700fea0a3792dd387dc401.tar.gz
itools-6a24a37e8e203ff0f7700fea0a3792dd387dc401.tar.bz2
itools-6a24a37e8e203ff0f7700fea0a3792dd387dc401.zip
warn if oversized urls are generated
-rw-r--r--it_html.class6
1 files changed, 5 insertions, 1 deletions
diff --git a/it_html.class b/it_html.class
index 390e8ae..65d1eaa 100644
--- a/it_html.class
+++ b/it_html.class
@@ -548,7 +548,11 @@ static function U(/* ... */)
$u['query'] = it_url::params($u['params'] + $params);
}
- return $schemepart . $u['path'] . ($u['query'] ? "?" . $u['query'] : "") . ($u['fragment'] ? "#" . $u['fragment'] : "");
+ $url = $schemepart . $u['path'] . ($u['query'] ? "?" . $u['query'] : "") . ($u['fragment'] ? "#" . $u['fragment'] : "");
+ if (strlen($url) >= 2000)
+ it::error(['title' => 'url too long', 'body' => $url]);
+
+ return $url;
}