summaryrefslogtreecommitdiffstats
path: root/etherpad
diff options
context:
space:
mode:
authorJeff Mitchell <etherpad@jefferai.org>2010-04-07 18:33:31 -0400
committerJeff Mitchell <etherpad@jefferai.org>2010-04-07 18:33:31 -0400
commitcc79f0e2c6b9452b2f0a8224d12421745c7ab134 (patch)
treec48b3caeab7c848517dfd94733e578d111fcd2cd /etherpad
parenta8a2dae29ecd1f1ec2a334df980e49ea04ee61b8 (diff)
downloadetherpad-cc79f0e2c6b9452b2f0a8224d12421745c7ab134.tar.gz
etherpad-cc79f0e2c6b9452b2f0a8224d12421745c7ab134.tar.bz2
etherpad-cc79f0e2c6b9452b2f0a8224d12421745c7ab134.zip
Fix up getTempSigninUrl option so that it uses https when appropriate and http otherwise.
Diffstat (limited to 'etherpad')
-rw-r--r--etherpad/src/etherpad/pro/pro_accounts.js14
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('');
}