mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-07 03:22:21 +03:00
fix uid method in core/server/utils/index.js to return a string which length is equal to len argument (#8025)
closes #7998
This commit is contained in:
parent
b79df0e89a
commit
481154a55b
@ -48,7 +48,7 @@ utils = {
|
|||||||
charlen = chars.length,
|
charlen = chars.length,
|
||||||
i;
|
i;
|
||||||
|
|
||||||
for (i = 1; i < len; i = i + 1) {
|
for (i = 0; i < len; i = i + 1) {
|
||||||
buf.push(chars[getRandomInt(0, charlen - 1)]);
|
buf.push(chars[getRandomInt(0, charlen - 1)]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user