Skip to content

encoding longUrl for admin-ajax.php breaks some urls #49

Description

@adamcoulombe

Some long urls that contain spaces like %20 (or other encoded data) are not being saved to the DB faithfully.

take the following url for example:
https://mydocumentsharingplace.net/My%20Storage%20Folder/My%20Shared%20File.txt

gets stored in the shlink database as:
https://mydocumentsharingplace.net/MyStorageFolder/MySharedFile.txt

Which results in being redirected to a 404, because it isnt the same URL.

I suspect the issue is that the longUrl is being encoded and passed as a URI argument through admin-ajax.php as opposed to being sent in the request body as JSON. When I test the same URL using the Shlink web app, the URL is saved in the DB correctly. The shlink webapp accesses the shlink rest API directly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions