Skip to content

Conversation

@kaxil
Copy link
Member

@kaxil kaxil commented Mar 19, 2021

Looks like "trying to be smart approach" in #14738
does not work on old Python versions. The "smart" part being if semicolon exists in URL
only those specific query argument were removed. While this solves the issue for Py 3.6.13
it didn't fix for 3.6.12 (although it minimzed it).

Python 3.6.12:

>>> parse_qsl("r=3;a=b")
[('r', '3'), ('a', 'b')]

Python 3.6.13:

>>> parse_qsl("r=3;a=b")
[('r', '3;a=b')]

This commit simplifies it and check if the url contains ;, it just redirects to
/home.


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.

Looks like "trying to be smart approach" in apache#14738
does not work on old Python versions. The "smart" part being if semicolon exists in URL
only those specific query argument were removed. While this solves the issue for Py 3.6.13
 it didn't fix for 3.6.12 (although it minimzed it).

Python 3.6.12:

```python
>>> parse_qsl("r=3;a=b")
[('r', '3'), ('a', 'b')]
```

Python 3.6.13:

```python
>>> parse_qsl("r=3;a=b")
[('r', '3;a=b')]
```

This commit simplifies it and check if the url contains `;`, it just redirects to
`/home`.
@kaxil kaxil added this to the Airflow 2.0.2 milestone Mar 19, 2021
@kaxil kaxil requested a review from ashb March 19, 2021 22:01
@kaxil kaxil requested a review from ryanahamilton as a code owner March 19, 2021 22:01
@boring-cyborg boring-cyborg bot added the area:webserver Webserver related Issues label Mar 19, 2021
@ashb
Copy link
Member

ashb commented Mar 19, 2021

Could you cherry-pick this too please?

@kaxil
Copy link
Member Author

kaxil commented Mar 19, 2021

Could you cherry-pick this too please?

Yup, will do

@github-actions
Copy link

The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest master or amend the last commit of the PR, and push it with --force-with-lease.

@github-actions github-actions bot added the okay to merge It's ok to merge this PR as it does not require more tests label Mar 19, 2021
@kaxil kaxil merged commit 178dee9 into apache:master Mar 20, 2021
@kaxil kaxil deleted the simplify-semicolon branch March 20, 2021 00:39
kaxil added a commit that referenced this pull request Mar 20, 2021
Looks like "trying to be smart approach" in #14738
does not work on old Python versions. The "smart" part being if semicolon exists in URL
only those specific query argument were removed. While this solves the issue for Py 3.6.13
 it didn't fix for 3.6.12 (although it minimzed it).

Python 3.6.12:

```python
>>> parse_qsl("r=3;a=b")
[('r', '3'), ('a', 'b')]
```

Python 3.6.13:

```python
>>> parse_qsl("r=3;a=b")
[('r', '3;a=b')]
```

This commit simplifies it and check if the url contains `;`, it just redirects to
`/home`.

(cherry picked from commit 178dee9)
kaxil added a commit to astronomer/airflow that referenced this pull request Mar 20, 2021
…e#14905)

Looks like "trying to be smart approach" in apache#14738
does not work on old Python versions. The "smart" part being if semicolon exists in URL
only those specific query argument were removed. While this solves the issue for Py 3.6.13
 it didn't fix for 3.6.12 (although it minimzed it).

Python 3.6.12:

```python
>>> parse_qsl("r=3;a=b")
[('r', '3'), ('a', 'b')]
```

Python 3.6.13:

```python
>>> parse_qsl("r=3;a=b")
[('r', '3;a=b')]
```

This commit simplifies it and check if the url contains `;`, it just redirects to
`/home`.

(cherry picked from commit 178dee9)
kaxil added a commit to astronomer/airflow that referenced this pull request Mar 20, 2021
…e#14905)

Looks like "trying to be smart approach" in apache#14738
does not work on old Python versions. The "smart" part being if semicolon exists in URL
only those specific query argument were removed. While this solves the issue for Py 3.6.13
 it didn't fix for 3.6.12 (although it minimzed it).

Python 3.6.12:

```python
>>> parse_qsl("r=3;a=b")
[('r', '3'), ('a', 'b')]
```

Python 3.6.13:

```python
>>> parse_qsl("r=3;a=b")
[('r', '3;a=b')]
```

This commit simplifies it and check if the url contains `;`, it just redirects to
`/home`.

(cherry picked from commit 178dee9)
ashb pushed a commit that referenced this pull request Apr 15, 2021
Looks like "trying to be smart approach" in #14738
does not work on old Python versions. The "smart" part being if semicolon exists in URL
only those specific query argument were removed. While this solves the issue for Py 3.6.13
 it didn't fix for 3.6.12 (although it minimzed it).

Python 3.6.12:

```python
>>> parse_qsl("r=3;a=b")
[('r', '3'), ('a', 'b')]
```

Python 3.6.13:

```python
>>> parse_qsl("r=3;a=b")
[('r', '3;a=b')]
```

This commit simplifies it and check if the url contains `;`, it just redirects to
`/home`.

(cherry picked from commit 178dee9)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:webserver Webserver related Issues okay to merge It's ok to merge this PR as it does not require more tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants