Skip to content

Commit

Permalink
fix some vulnerabilities (#1393)
Browse files Browse the repository at this point in the history
  • Loading branch information
akihikokuroda authored Jun 26, 2024
1 parent ff7bbfa commit 8ce8c02
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion gateway/main/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@
DATABASES["default"] = DATABASES["test"]

# Password validation
# https://docs.djangoproject.com/en/4.1/ref/settings/#auth-password-validators

AUTH_PASSWORD_VALIDATORS = [
{
Expand Down
5 changes: 2 additions & 3 deletions proxy/proxy/wsgiproxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def do_post(path): # pylint: disable=unused-argument disable=too-many-locals
data = request.get_data()
job_request = request.path.find("/runtime/jobs") != -1
middleware_job_id = None
token = "awesome_token"
token = ""
if job_request:
if "X-Qx-Client-Application" in request.headers:
qiskit_header = request.headers["X-Qx-Client-Application"]
Expand All @@ -99,8 +99,7 @@ def do_post(path): # pylint: disable=unused-argument disable=too-many-locals
)
token_end = qiskit_header.find("/", token_begin)
token = qiskit_header[token_begin:token_end]
sanitized = token.replace("\n", "").replace("\r", "")
logging.debug("gateway token: %s", sanitized)
logging.debug("gateway token found")

resp = None
retry = 5
Expand Down

0 comments on commit 8ce8c02

Please sign in to comment.