mirror of
https://github.com/pretix/pretix.git
synced 2026-05-09 15:54:03 +00:00
Fix email confirm hash in templates
This commit is contained in:
@@ -40,6 +40,7 @@ import json
|
|||||||
import logging
|
import logging
|
||||||
import operator
|
import operator
|
||||||
import string
|
import string
|
||||||
|
import warnings
|
||||||
from collections import Counter
|
from collections import Counter
|
||||||
from datetime import datetime, time, timedelta
|
from datetime import datetime, time, timedelta
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
@@ -384,6 +385,11 @@ class Order(LockModel, LoggedModel):
|
|||||||
def email_confirm_secret(self):
|
def email_confirm_secret(self):
|
||||||
return self.tagged_secret("email_confirm", 9)
|
return self.tagged_secret("email_confirm", 9)
|
||||||
|
|
||||||
|
def email_confirm_hash(self):
|
||||||
|
warnings.warn('Use email_confirm_secret() instead of email_confirm_hash().',
|
||||||
|
DeprecationWarning)
|
||||||
|
return self.email_confirm_secret()
|
||||||
|
|
||||||
def check_email_confirm_secret(self, received_secret):
|
def check_email_confirm_secret(self, received_secret):
|
||||||
return (
|
return (
|
||||||
hmac.compare_digest(
|
hmac.compare_digest(
|
||||||
|
|||||||
@@ -143,7 +143,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<div class="order-button">
|
<div class="order-button">
|
||||||
<a href="{% abseventurl event "presale:event.order.open" hash=order.email_confirm_hash order=order.code secret=order.secret %}" class="button">
|
<a href="{% abseventurl event "presale:event.order.open" hash=order.email_confirm_secret order=order.code secret=order.secret %}" class="button">
|
||||||
{% trans "View order details" %}
|
{% trans "View order details" %}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user