mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 20:55:55 +00:00
remove unnecessary wrapping from share uniqid() keys
This commit is contained in:
@@ -407,7 +407,7 @@ class Instances extends Plugin implements IHandler {
|
||||
|
||||
print "<hr/>";
|
||||
|
||||
$access_key = sha1(uniqid(rand(), true));
|
||||
$access_key = uniqid();
|
||||
|
||||
/* Access key */
|
||||
|
||||
@@ -439,7 +439,7 @@ class Instances extends Plugin implements IHandler {
|
||||
}
|
||||
|
||||
function genHash() {
|
||||
$hash = sha1(uniqid(rand(), true));
|
||||
$hash = uniqid();
|
||||
|
||||
print json_encode(array("hash" => $hash));
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ class Share extends Plugin {
|
||||
function newkey() {
|
||||
$id = db_escape_string($_REQUEST['id']);
|
||||
|
||||
$uuid = db_escape_string(sha1(uniqid(rand(), true)));
|
||||
$uuid = db_escape_string(uniqid());
|
||||
|
||||
db_query("UPDATE ttrss_user_entries SET uuid = '$uuid' WHERE int_id = '$id'
|
||||
AND owner_uid = " . $_SESSION['uid']);
|
||||
@@ -91,7 +91,7 @@ class Share extends Plugin {
|
||||
$ref_id = db_fetch_result($result, 0, "ref_id");
|
||||
|
||||
if (!$uuid) {
|
||||
$uuid = db_escape_string(sha1(uniqid(rand(), true)));
|
||||
$uuid = db_escape_string(uniqid());
|
||||
db_query("UPDATE ttrss_user_entries SET uuid = '$uuid' WHERE int_id = '$param'
|
||||
AND owner_uid = " . $_SESSION['uid']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user