Unverified Commit dc4c8662 authored by Vasili Novikov's avatar Vasili Novikov
Browse files

Allow empty password in PluginAuth

See memri/pod#401
for longer-term solution
parent dab1f311
Showing with 1 addition and 1 deletion
+1 -1
......@@ -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()),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment