Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alp Deniz Ogut
Pod
Commits
dc4c8662
Unverified
Commit
dc4c8662
authored
3 years ago
by
Vasili Novikov
Browse files
Options
Download
Email Patches
Plain Diff
Allow empty password in PluginAuth
See
memri/pod#401
for longer-term solution
parent
dab1f311
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugin_auth_crypto.rs
+1
-1
src/plugin_auth_crypto.rs
with
1 addition
and
1 deletion
+1
-1
src/plugin_auth_crypto.rs
+
1
-
1
View file @
dc4c8662
...
...
@@ -47,7 +47,7 @@ pub fn extract_database_key(plugin_auth: &PluginAuth) -> Result<DatabaseKey> {
let
nonce
=
XNonce
::
from_slice
(
&
nonce
);
let
cipher
=
&
global_static
::
CIPHER
;
let
decrypted
=
cipher
.decrypt
(
&
nonce
,
encrypted_permissions
.as_ref
())
?
;
if
decrypted
.len
()
!=
32
{
if
decrypted
.len
()
!=
32
&&
decrypted
.len
()
!=
0
{
return
Err
(
Error
{
code
:
StatusCode
::
BAD_REQUEST
,
msg
:
format!
(
"Key has incorrect length: {}"
,
decrypted
.len
()),
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment