diff options
author | Damien F. Katz <damien@apache.org> | 2008-11-17 18:18:51 +0000 |
---|---|---|
committer | Damien F. Katz <damien@apache.org> | 2008-11-17 18:18:51 +0000 |
commit | aee6f18edf8cdf3f7c09c93fcf1af48c2c15fcd8 (patch) | |
tree | fd3a259ba4b0edd2c9ea5e6657f0ae314b36cbb5 /src/couchdb/couch_server.erl | |
parent | d32d8acff4bac6f51b87ddef7091c04ff7245d40 (diff) |
More security and validation work. Still incomplete.
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@718311 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb/couch_server.erl')
-rw-r--r-- | src/couchdb/couch_server.erl | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/couchdb/couch_server.erl b/src/couchdb/couch_server.erl index b0d03a53..a81ca5e1 100644 --- a/src/couchdb/couch_server.erl +++ b/src/couchdb/couch_server.erl @@ -202,7 +202,7 @@ handle_call(get_root, _From, #server{root_dir=Root}=Server) -> {reply, {ok, Root}, Server}; handle_call({open, DbName, Options}, {FromPid,_}, Server) -> DbNameList = binary_to_list(DbName), - UserCreds = proplists:get_value(creds, Options, nil), + UserCtx = proplists:get_value(user_ctx, Options, nil), case check_dbname(Server, DbNameList) of ok -> Filepath = get_full_filename(Server, DbNameList), @@ -218,7 +218,7 @@ handle_call({open, DbName, Options}, {FromPid,_}, Server) -> true = ets:insert(couch_dbs_by_lru, {LruTime, DbName}), DbsOpen = Server2#server.current_dbs_open + 1, {reply, - couch_db:open_ref_counted(MainPid, FromPid, UserCreds), + couch_db:open_ref_counted(MainPid, FromPid, UserCtx), Server2#server{current_dbs_open=DbsOpen}}; Error -> {reply, Error, Server2} @@ -231,7 +231,7 @@ handle_call({open, DbName, Options}, {FromPid,_}, Server) -> true = ets:delete(couch_dbs_by_lru, PrevLruTime), true = ets:insert(couch_dbs_by_lru, {LruTime, DbName}), {reply, - couch_db:open_ref_counted(MainPid, FromPid, UserCreds), + couch_db:open_ref_counted(MainPid, FromPid, UserCtx), Server} end; Error -> @@ -239,7 +239,7 @@ handle_call({open, DbName, Options}, {FromPid,_}, Server) -> end; handle_call({create, DbName, Options}, {FromPid,_}, Server) -> DbNameList = binary_to_list(DbName), - UserCreds = proplists:get_value(creds, Options, nil), + UserCtx = proplists:get_value(user_ctx, Options, nil), case check_dbname(Server, DbNameList) of ok -> Filepath = get_full_filename(Server, DbNameList), @@ -255,7 +255,7 @@ handle_call({create, DbName, Options}, {FromPid,_}, Server) -> DbsOpen = Server#server.current_dbs_open + 1, couch_db_update_notifier:notify({created, DbName}), {reply, - couch_db:open_ref_counted(MainPid, FromPid, UserCreds), + couch_db:open_ref_counted(MainPid, FromPid, UserCtx), Server#server{current_dbs_open=DbsOpen}}; Error -> {reply, Error, Server} @@ -268,7 +268,7 @@ handle_call({create, DbName, Options}, {FromPid,_}, Server) -> end; handle_call({delete, DbName, Options}, _From, Server) -> DbNameList = binary_to_list(DbName), - _UserCreds = proplists:get_value(creds, Options, nil), + _UserCtx = proplists:get_value(user_ctx, Options, nil), case check_dbname(Server, DbNameList) of ok -> FullFilepath = get_full_filename(Server, DbNameList), |