diff options
author | Jeff Mitchell <etherpad@jefferai.org> | 2010-04-07 18:33:31 -0400 |
---|---|---|
committer | Jeff Mitchell <etherpad@jefferai.org> | 2010-04-07 18:33:31 -0400 |
commit | cc79f0e2c6b9452b2f0a8224d12421745c7ab134 (patch) | |
tree | c48b3caeab7c848517dfd94733e578d111fcd2cd | |
parent | a8a2dae29ecd1f1ec2a334df980e49ea04ee61b8 (diff) | |
download | etherpad-cc79f0e2c6b9452b2f0a8224d12421745c7ab134.tar.gz etherpad-cc79f0e2c6b9452b2f0a8224d12421745c7ab134.tar.xz etherpad-cc79f0e2c6b9452b2f0a8224d12421745c7ab134.zip |
Fix up getTempSigninUrl option so that it uses https when appropriate and http otherwise.
Diffstat (limited to '')
-rw-r--r-- | etherpad/src/etherpad/pro/pro_accounts.js | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/etherpad/src/etherpad/pro/pro_accounts.js b/etherpad/src/etherpad/pro/pro_accounts.js index cdecd0d..54ac50c 100644 --- a/etherpad/src/etherpad/pro/pro_accounts.js +++ b/etherpad/src/etherpad/pro/pro_accounts.js @@ -511,10 +511,16 @@ function getFullNameById(id) { } function getTempSigninUrl(account, tempPass) { - return [ - 'https://', httpsHost(pro_utils.getFullProHost()), '/ep/account/sign-in?', - 'uid=', account.id, '&tp=', tempPass - ].join(''); + if(appjet.config.listenSecurePort != 0 || appjet.config.useHttpsUrls) + return [ + 'https://', httpsHost(pro_utils.getFullProHost()), '/ep/account/sign-in?', + 'uid=', account.id, '&tp=', tempPass + ].join(''); + else + return [ + 'http://', httpHost(pro_utils.getFullProHost()), '/ep/account/sign-in?', + 'uid=', account.id, '&tp=', tempPass + ].join(''); } |