mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-11 17:44:44 +08:00
Make name required in ApiKey entity
This commit is contained in:
@@ -41,7 +41,7 @@ final readonly class ApiKeyMeta
|
||||
|
||||
// If a name was not provided, fall back to the key
|
||||
if (empty($name)) {
|
||||
// If the key was auto-generated, fall back to a "censored" version of the UUID, otherwise simply use the
|
||||
// If the key was auto-generated, fall back to a redacted version of the UUID, otherwise simply use the
|
||||
// plain key as fallback name
|
||||
$name = $key === null
|
||||
? sprintf('%s-****-****-****-************', substr($resolvedKey, offset: 0, length: 8))
|
||||
|
||||
Reference in New Issue
Block a user