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

draw.io link is not encoded correctly #2420

Open
fribse opened this Issue Aug 7, 2018 · 7 comments

Comments

Projects
None yet
3 participants
@fribse
Copy link

fribse commented Aug 7, 2018

When I create a drawing in draw.io and wish to publish it, it creates a link of 3490 characters (more or less).
When I try to shorten it with yourls, I get an error when I try to open the link.

Steps to reproduce the behavior:

  1. Go to 'draw.io'
  2. Click on 'New... (network in my case)'
  3. Create a network diagram.
  4. Publish link -> Copy
  5. Enter it in yourls
  6. Click the yourls short link

It should just open a lightbox with the diagram, like when clicking on it directly, or if I shorten it with tinyurl.com

  • YOURLS version: 1.72 (just downloaded zip update today).
    • Plugins enabled: "Allow Hyphens in Short URLs"
  • PHP version: 5.6.36

This might be covered by the 'that fucking URL encoding problem', but as the URL is so incredebly long, I can't tell.

@majordome

This comment was marked as off-topic.

Copy link

majordome bot commented Aug 7, 2018

Hey @fribse, thanks for opening an issue!

Unfortunately, it seems you are missing information from the issue template.
Make sure it has all the necessary details as described in our contribution guidelines.

@dgw

This comment has been minimized.

Copy link
Member

dgw commented Aug 7, 2018

I can't reproduce this. I'm not entirely sure how to control the length of the draw.io link, but cloning one of the network diagram templates got me ~2314 characters to dump into my own YOURLS instance (using nginx, running under PHP 5 like yours), and it redirects just fine.

You say you get "an error" trying to open the link, but neglected to provide the actual error message and/or description, so I don't really know what I'm looking for beyond something that doesn't work. 😅

@dgw

This comment has been minimized.

Copy link
Member

dgw commented Aug 7, 2018

5799 characters, no issues on my install.

I really think you should state some of these errors, and the associated "hoops" you're trying to jump through, as this seems to be an issue with not with YOURLS itself but your particular environment. (To that end, I'm closing the "issue", but we can still talk.)

@dgw dgw closed this Aug 7, 2018

@dgw dgw added the question label Aug 7, 2018

@fribse

This comment has been minimized.

Copy link
Author

fribse commented Aug 7, 2018

Hmm, somewhere things go wrong.
I've just tried it again, and now it works, I wonder if it's draw.io's URL thats just wrong somehow?
So now I have two working draw.io drawings links, and one not working...

@ozh

This comment has been minimized.

Copy link
Member

ozh commented Aug 7, 2018

Most likely this isn't a matter of URL length (it's stored as TEXT thus can be 65,535 bytes long) but simply that fucking URL encoding problem which everyone is aware about.

@dgw

This comment has been minimized.

Copy link
Member

dgw commented Aug 7, 2018

I discarded length as a possibility already.

Those errors sound like there might be an issue with how draw.io is constructing the URLs. Maybe try contacting their support with a link that throws one of those errors and see what they say about it.

Edited upon poking around in devtools on draw.io: This probably is "that fucking URL encoding problem", as it seems they encode to base64 for the share URL and try to decode it when you click one. I'll label the issue as such.

@dgw dgw added encoding and removed question labels Aug 7, 2018

@dgw dgw reopened this Aug 7, 2018

@fribse

This comment has been minimized.

Copy link
Author

fribse commented Aug 8, 2018

Ok, so that's up in the air at the moment, a bit saddened that I had to send the URL via an "open" service, and not just use my own, but until it's solved I guess I have to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.