Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes two errors when dealing with an encoded url #7107

Merged
merged 4 commits into from Jan 30, 2023

Commits on Sep 27, 2022

  1. Fixes a two errors when dealing with a encoded url.

    * url in question /%EF%AC%81?foo=bar&bz=%AC%81
    * This is a unicode character, which can't be decoded from
    ascii. Jinja templates will handle this if it's unicode, or if it's
    hex encoded ascii, but can't take a non-unicode string in python 2 and
    put this in a template.
    * The querystring was being quoted, which is incorrect, as:
      1) the special characters in the query string mean something
      2) The rest of the querystring is already quoted. This makes it
      double quoted, as seen in the datastore file
    * We don't want to unquote urls before putting them in the template
    anyway.
    * There was s further error passing this unicode path to the template
    resolution, where in posix path, it fails:
    ```
    File '/usr/lib/ckan/default/lib/python2.7/posixpath.py', line 73 in join
      path += '/' + b
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xef in position 1: ordinal not in range(128)
    ```
    The solution here is to make sure it's unicode passed into the
    function.
    EricSoroos committed Sep 27, 2022
    Configuration menu
    Copy the full SHA
    fed7f76 View commit details
    Browse the repository at this point in the history
  2. Fix urlparse function call

    EricSoroos committed Sep 27, 2022
    Configuration menu
    Copy the full SHA
    05bda1a View commit details
    Browse the repository at this point in the history
  3. Lint

    EricSoroos committed Sep 27, 2022
    Configuration menu
    Copy the full SHA
    cb95de0 View commit details
    Browse the repository at this point in the history

Commits on Dec 8, 2022

  1. changelog entry

    EricSoroos committed Dec 8, 2022
    Configuration menu
    Copy the full SHA
    2fcbb34 View commit details
    Browse the repository at this point in the history