refactor(backend): replace rndstr with secureRndstr (#11044)

* refactor(backend): replace rndstr with secureRndstr

* Update pnpm-lock.yaml

* .js
This commit is contained in:
Kagami Sascha Rosylight 2023-06-25 04:04:33 +02:00 committed by GitHub
parent 7bb8c71543
commit ef354e94f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 57 additions and 64 deletions

View file

@ -44,7 +44,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
) {
super(meta, paramDef, async (ps, me) => {
// Generate secret
const secret = secureRndstr(32, true);
const secret = secureRndstr(32);
// for backward compatibility
const permission = unique(ps.permission.map(v => v.replace(/^(.+)(\/|-)(read|write)$/, '$3:$1')));