summaryrefslogtreecommitdiffstats
path: root/eopayment/systempayv2.py
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2016-03-09 21:31:40 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2016-03-09 21:31:40 (GMT)
commit60a71c626edb0114ec74fd924f7edfef796447f2 (patch)
tree8018989552c3b67d8025bfe850440d87f36e3046 /eopayment/systempayv2.py
parent297e9a851455dace613a4f8615d65f383113eb74 (diff)
downloadeopayment-60a71c626edb0114ec74fd924f7edfef796447f2.zip
eopayment-60a71c626edb0114ec74fd924f7edfef796447f2.tar.gz
eopayment-60a71c626edb0114ec74fd924f7edfef796447f2.tar.bz2
general: check responses for required attributes as 1st processing step (#9729)
Diffstat (limited to 'eopayment/systempayv2.py')
-rw-r--r--eopayment/systempayv2.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/eopayment/systempayv2.py b/eopayment/systempayv2.py
index 4442668..bb1412a 100644
--- a/eopayment/systempayv2.py
+++ b/eopayment/systempayv2.py
@@ -8,7 +8,8 @@ import urlparse
import warnings
from gettext import gettext as _
-from common import PaymentCommon, PaymentResponse, PAID, ERROR, FORM, Form
+from common import (PaymentCommon, PaymentResponse, PAID, ERROR, FORM, Form,
+ ResponseError)
from cb import CB_RESPONSE_CODES
__all__ = ['Payment']
@@ -338,6 +339,8 @@ class Payment(PaymentCommon):
def response(self, query_string, **kwargs):
fields = urlparse.parse_qs(query_string, True)
+ if not set(fields) >= set([SIGNATURE, VADS_CTX_MODE, VADS_AUTH_RESULT]):
+ raise ResponseError()
for key, value in fields.iteritems():
fields[key] = value[0]
copy = fields.copy()