mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-12-23 07:11:52 +00:00
fix(web/image_hosting): hash suffix
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
ca85ba3982
commit
20cecd34a2
@ -51,7 +51,7 @@
|
||||
}
|
||||
|
||||
list($width, $height, $type) = $size;
|
||||
$hash = hash_file("sha256", $_FILES['image_upload_file']['tmp_name']);
|
||||
$hash = hash_file("sha256", $_FILES['image_upload_file']['tmp_name']) . Auth::id();
|
||||
$scale = ceil($height / 600.0);
|
||||
|
||||
$watermark_text = UOJConfig::$data['profile']['oj-name-short'];
|
||||
@ -60,7 +60,7 @@
|
||||
$hash .= "__no_watermark";
|
||||
} elseif ($_POST['watermark'] == 'site_shortname_and_username') {
|
||||
$watermark_text .= ' @'.Auth::id();
|
||||
$hash .= "__id_".Auth::id();
|
||||
$hash .= "__id";
|
||||
}
|
||||
|
||||
$existing_image = DB::selectFirst("SELECT * FROM users_images WHERE `hash` = '$hash'");
|
||||
|
Loading…
Reference in New Issue
Block a user