Commit a0ab47a4 authored by Valentin Samir's avatar Valentin Samir
Browse files

Allow pgtUrl to be localhost without https

parent b96c0ef4
......@@ -23,6 +23,7 @@ from django.views.decorators.csrf import csrf_exempt
from django.views.generic import View
import re
import logging
import pprint
import requests
......@@ -666,7 +667,10 @@ class ValidateService(View, AttributesMixin):
params['username'] = self.ticket.user.attributs.get(
if self.pgt_url and self.pgt_url.startswith("https://"):
if self.pgt_url and (
self.pgt_url.startswith("https://") or
re.match("^http://(127\.0\.0\.1|localhost)(:[0-9]+)?(/.*)?$", self.pgt_url)
return self.process_pgturl(params)
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