1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 01:46:00 +00:00

fix a bunch of bookmarklets login forms not leading back

This commit is contained in:
Andrew Dolgov
2021-03-04 13:40:54 +03:00
parent 30765805fd
commit 4fda5ccd0e
5 changed files with 19 additions and 6 deletions

View File

@@ -236,6 +236,14 @@
}
}
function with_trailing_slash(string $str) : string {
if (substr($str, -1) === "/") {
return $str;
} else {
return "$str/";
}
}
function make_password($length = 12) {
$password = "";
$possible = "0123456789abcdfghjkmnpqrstvwxyzABCDFGHJKMNPQRSTVWXYZ*%+^";

View File

@@ -85,7 +85,7 @@
</script>
<?php $return = urlencode(Config::make_self_url()) ?>
<?php $return = urlencode($_REQUEST['return'] ? $_REQUEST['return'] : with_trailing_slash(Config::make_self_url())) ?>
<div class="container">