From cc79f0e2c6b9452b2f0a8224d12421745c7ab134 Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Wed, 7 Apr 2010 18:33:31 -0400 Subject: Fix up getTempSigninUrl option so that it uses https when appropriate and http otherwise. --- etherpad/src/etherpad/pro/pro_accounts.js | 14 ++++++++++---- 1 file 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(''); } -- cgit v1.2.3