Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloud-filelink.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Viguier <guillaume@viguierjust.com>2018-09-20 16:26:12 +0300
committerGuillaume Viguier <guillaume@viguierjust.com>2018-09-20 16:26:12 +0300
commita6fcdd504e13ee00090a3a89f48d1ba774b0b0ef (patch)
treed82170b39a73b5a65b2c7b31edc3e84c3fb10c71
parent278431675ebd0228816c66afa0c0ce6f2e0c9285 (diff)
Password issues
-rw-r--r--src/components/nsNextcloud.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/components/nsNextcloud.js b/src/components/nsNextcloud.js
index dc89515..39013f3 100644
--- a/src/components/nsNextcloud.js
+++ b/src/components/nsNextcloud.js
@@ -361,8 +361,13 @@ Nextcloud.prototype = {
this.log.info("Suppressing password prompt");
}
- let passwordURI = this._serverUrl;
- let logins = Services.logins.findLogins({}, passwordURI, null, passwordURI);
+ let passwordRealm = this._serverUrl;
+ let passwordHostname = this._serverUrl;
+ const thirdSlash = this._serverUrl.indexOf('/', 9);
+ if (thirdSlash !== -1) {
+ passwordHostname = this._serverUrl.slice(0, thirdSlash);
+ }
+ let logins = Services.logins.findLogins({}, passwordHostname, null, passwordRealm);
for (let loginInfo of logins) {
if (loginInfo.username == aUsername) {
return loginInfo.password;