From aa5daeca5c54432e6b985508fadcd3d85cc5388d Mon Sep 17 00:00:00 2001 From: Jan Lehnardt Date: Sat, 5 Sep 2009 20:37:45 +0000 Subject: code =~ s/imperative/declarative & faster/, thanks to Kostis Sagonas for pointing these out, more to come git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@811709 13f79535-47bb-0310-9956-ffa450edef68 --- src/couchdb/couch_httpd_auth.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/couchdb/couch_httpd_auth.erl') diff --git a/src/couchdb/couch_httpd_auth.erl b/src/couchdb/couch_httpd_auth.erl index e7a2e3a1..522c0266 100644 --- a/src/couchdb/couch_httpd_auth.erl +++ b/src/couchdb/couch_httpd_auth.erl @@ -446,7 +446,7 @@ update_user_req(#httpd{method='PUT', mochi_req=MochiReq, user_ctx=UserCtx}=Req, Hash = case Password of <<>> -> CurrentPasswordHash; - _P when length(OldPassword) == 0 -> + _P when OldPassword = [] -> throw({forbidden, <<"Old password is incorrect.">>}); _Else -> OldPasswordHash = hash_password(OldPassword1, UserSalt), -- cgit v1.2.3