You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/01/10 22:49:09 UTC

[GitHub] stale[bot] closed pull request #3605: [AIRFLOW-1238] Decode URL-encoded characters.

stale[bot] closed pull request #3605: [AIRFLOW-1238] Decode URL-encoded characters.
URL: https://github.com/apache/airflow/pull/3605
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/airflow/models.py b/airflow/models.py
index 57ef9d3d33..ea8eeca13f 100755
--- a/airflow/models.py
+++ b/airflow/models.py
@@ -52,7 +52,7 @@
 
 import uuid
 from datetime import datetime
-from urllib.parse import urlparse, quote, parse_qsl
+from urllib.parse import urlparse, quote, parse_qsl, unquote
 
 from sqlalchemy import (
     Column, Integer, String, DateTime, Text, Boolean, ForeignKey, PickleType,
@@ -686,8 +686,8 @@ def parse_from_uri(self, uri):
         self.conn_type = conn_type
         self.host = hostname
         self.schema = temp_uri.path[1:]
-        self.login = temp_uri.username
-        self.password = temp_uri.password
+        self.login = unquote(temp_uri.username or '')
+        self.password = unquote(temp_uri.password or '')
         self.port = temp_uri.port
         if temp_uri.query:
             self.extra = json.dumps(dict(parse_qsl(temp_uri.query)))


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services