Commit 4dcfcd3b authored by Rémi Cardona's avatar Rémi Cardona
Browse files

[views] Always generate HTTPS URLs if the instance supports said protocol

Closes #4491860
parent ac99463b1d6f
......@@ -102,7 +102,7 @@ See you soon on %(base_url)s !
data.setdefault(qname('surname'), '')
if not (data.get(qname('firstname')) or data.get(qname('surname'))):
data[qname('firstname')] = data[qname('login')]
data.update({'base_url': self._cw.vreg.config['base-url'],
data.update({'base_url': self._cw.base_url(secure=True),
'url': activationurl})
content = self._cw._(self.content) % data
subject = self._cw._(self.subject) % data
......@@ -112,7 +112,7 @@ See you soon on %(base_url)s !
def activation_url(self, data):
data.pop(qname('upassword') + '-confirm', None)
key = crypto.encrypt(data, self._cw.vreg.config['registration-cypher-seed'])
return self._cw.build_url('registration_confirm', key=key)
return self._cw.build_url('registration_confirm', key=key, __secure__=True)
def success_redirect_url(self):
msg = self._cw._(u'Your registration email has been sent. Follow '
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment