mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-23 16:32:45 +00:00
Use undashed UUIDs for URL parameters
This commit is contained in:
parent
7e4d5de57a
commit
ef84e6f782
@ -42,6 +42,7 @@ class Check {
|
||||
$this->println(str_replace("{name}", $name, $page->t("error.name.unseen")));
|
||||
return;
|
||||
}
|
||||
$uuid = $page->uuid_undashify($uuid);
|
||||
$href = "history.php?uuid=$uuid";
|
||||
|
||||
if ($type !== null) {
|
||||
|
@ -75,7 +75,7 @@ isset($_GET['uuid']) && is_string($_GET['uuid']) or die($page->t("error.missing-
|
||||
|
||||
$staffhistory = (isset($_GET['staffhistory']) && $_GET['staffhistory'] === "1");
|
||||
|
||||
$uuid = $_GET['uuid'];
|
||||
$uuid = $page->uuid_dashify($_GET['uuid']);
|
||||
$name = $page->get_name($uuid);
|
||||
|
||||
$name !== null or die(str_replace("{name}", $name, $page->t("error.name.unseen")));
|
||||
|
@ -214,7 +214,7 @@ class Page {
|
||||
}
|
||||
}
|
||||
|
||||
$uuid = str_replace("-", "", $uuid);
|
||||
$uuid = $this->uuid_undashify($uuid);
|
||||
$src = str_replace('{name}', $name, str_replace('{uuid}', $uuid, $avatar_source));
|
||||
if (in_array($name, $this->settings->console_aliases) || $name === $this->settings->console_name) {
|
||||
$src = $this->settings->console_image;
|
||||
@ -430,6 +430,11 @@ class Page {
|
||||
return $newstr;
|
||||
}
|
||||
|
||||
function uuid_undashify($str) {
|
||||
if (strlen($str) !== 36) return $str;
|
||||
return str_replace('-', '', $str);
|
||||
}
|
||||
|
||||
function print_title() {
|
||||
$title = $this->title;
|
||||
$name = $this->settings->name;
|
||||
|
Loading…
x
Reference in New Issue
Block a user