|
19 | 19 |
|
20 | 20 | namespace cb::sasl::mechanism::plain { |
21 | 21 |
|
22 | | -/** |
23 | | - * ns_server creates a legacy bucket user as part of the upgrade |
24 | | - * process which is used by the XDCR clients when they connect |
25 | | - * to they system. These clients _always_ connect by using PLAIN |
26 | | - * authentication so we should look up and try those users first. |
27 | | - * If it exists and we have a matching password we're good to go, |
28 | | - * otherwise we'll have to try the "normal" user. |
29 | | - */ |
30 | | -bool ServerBackend::try_legacy_user(const std::string& password) { |
31 | | - const std::string lecacy_username{username + ";legacy"}; |
32 | | - cb::sasl::pwdb::User user; |
33 | | - if (!find_user(lecacy_username, user)) { |
34 | | - return false; |
35 | | - } |
36 | | - |
37 | | - if (cb::sasl::plain::check_password(&context, user, password) == |
38 | | - Error::OK) { |
39 | | - username.assign(lecacy_username); |
40 | | - return true; |
41 | | - } |
42 | | - |
43 | | - return false; |
44 | | -} |
45 | | - |
46 | 22 | std::pair<Error, std::string_view> ServerBackend::start( |
47 | 23 | std::string_view input) { |
48 | 24 | if (input.empty()) { |
@@ -81,10 +57,6 @@ std::pair<Error, std::string_view> ServerBackend::start( |
81 | 57 | this->username.assign(username); |
82 | 58 | const std::string userpw(password, pwlen); |
83 | 59 |
|
84 | | - if (try_legacy_user(userpw)) { |
85 | | - return std::make_pair<Error, std::string_view>(Error::OK, {}); |
86 | | - } |
87 | | - |
88 | 60 | cb::sasl::pwdb::User user; |
89 | 61 | if (!find_user(username, user)) { |
90 | 62 | return std::pair<Error, std::string_view>{Error::NO_USER, {}}; |
|
0 commit comments