Ticket 62119: Fixes invalid url output#131
Conversation
Please see ticket 62119
minitest/minitest@9a57c52 ! Renamed MiniTest to Minitest. Your pinkies will thank me.
These tests are for commit 94c89f1
heyitsbryanm
left a comment
There was a problem hiding this comment.
Looks good - thanks!
AbuBoo
left a comment
There was a problem hiding this comment.
From testing the files I still get mark= with the equation set.
I tested it for both the signed URLs and not signed and for mark64 and regular mark.
On that, nothing is erroring, so if this patch works for the client's specific domain then its okay.
Outputs from my commands on branch Ticket 62119
Ahmed@imgixs-MBP imgix-rb % ruby generate-imgix-url-signed.rb Generated Imgix signed URL: https://s3testingdemosource.imgix.net/img/test/FELV-cat.jpg?ixlib=rb-4.1.0&w=500&h=700&mark64=&s=d9b732839820f0fba4d3071618aa532a
Ahmed@imgixs-MBP imgix-rb % ruby generate_imgix_url.rb Generated Imgix URL: https://assetmanager.imgix.net/test/FELV-cat.jpg?ixlib=rb-4.1.0&w=500&h=700&mark=
|
Hi @AbuBoo, thank you for looking into this! I would like to know where I can find the files you are referencing.
I would like to have this PR perfect. |
|
Hi @anthony0030, I was actually able to update my Ruby and fix my testing scripts; I replicated your steps and got the same output. Additionally, we tested with a test Block agaisnt our library to ensure no conflicting errors. From my end, this looks good to go. |
AbuBoo
left a comment
There was a problem hiding this comment.
LGTM after testing it works well with no errors.
|
Sorry pressed by mistake |
|
Good morning, Is there any update on getting this merged @heyitsbryanm, @AbuBoo ? I hope you have a great week. |
|
Sorry, took me a moment to get to this. I merged it and released a new version. Thanks again for writing the fix! Let me know if you need us to do anything else to make sure the fix is released. |
|
Good morning @heyitsbryanm, I appreciate your help so far! Could you also release the gem so it makes the installation easy? Have a great day! |
|
Hi! When I install the gem according to the instructions, I get version 4.1.0, not 4.1.1. This guide can be helpful: https://guides.rubygems.org/publishing Have a great week! |
@anthony0030 I'm looking into this this week and will follow up with you soon. Apologies for the delay. |
|
@anthony0030 This has been completed, and the version is now available for use. Sorry for the delay had to get the correct permissions to update this SDK. Let me know if you need anything else! |
|
@AbuBoo, thanks very much! I understand the problem. I will check it when I am back at the office. Have a great weekend! |
|
I checked it and I was able to install it with no problem! Thanks again @AbuBoo! |
Description
When making a URL with a blank parameter, it would outpoint an unneeded =
Before this PR...
https://demo.imgix.net/images/demo.png?mark=&h=200&w=200&s=XXXXXXXXXXXXXX
https://demo.imgix.net/images/demo.png?mark=
After this PR...
https://demo.imgix.net/images/demo.png?mark&h=200&w=200&s=XXXXXXXXXXXXXX
https://demo.imgix.net/images/demo.png?mark
Checklist
We have a default mark parameter defined within our Imgix source settings, and we need to generate an image for use with an OG tag WITHOUT the mark parameter. We deliberately pass in a blank "mark" parameter to override the default mark parameter defined in Imgix. Sending in a blank mark parameter removes the default watermark.
The SDK generates a URL with "mark=" with the correct signature, and this image is accessible; however, when Facebook tries to download this image, it goes to the image URL with "mark" (notice without the = sign). This makes the image URL invalid because the signature is for "mark=" and not "mark," and no image loads.
When somebody shares a link to their website, the card Facebook produces has no image.
This PR solves this problem as the generated URL is missing the "=" and Facebook visits the url correctly.
PS: This commit also fixes the tests not running due to the change in Minitest, MiniTest -> Minitest