Projet

Général

Profil

0001-certificate-check-configurable-via-settings-7521.patch

Voir les différences:

Subject: [PATCH] certificate check configurable via settings (#7521)

 mellon/app_settings.py | 1 +
 mellon/views.py        | 6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)
mellon/app_settings.py
26 26
            'ERROR_URL': None,
27 27
            'ERROR_REDIRECT_AFTER_TIMEOUT': 120,
28 28
            'DEFAULT_ASSERTION_CONSUMER_BINDING': 'post', # or artifact
29
            'VERIFY_SSL': True
29 30
    }
30 31

  
31 32
    @property
mellon/views.py
11 11

  
12 12
import lasso
13 13

  
14
from . import utils
14
from . import utils, app_settings
15

  
15 16

  
16 17
class LogMixin(object):
17 18
    """Initialize a module logger in new objects"""
......
147 148
        status_codes = []
148 149

  
149 150
        result = requests.post(login.msgUrl, data=login.msgBody,
150
                headers={'content-type': 'text/xml'})
151
                               headers={'content-type': 'text/xml'},
152
                               verify=app_settings.VERIFY_SSL)
151 153
        if result.status_code != 200:
152 154
            self.log.warning('SAML authentication failed: '\
153 155
                             'IdP returned %s when given artifact' % result.status_code)
154
-