Snapshot is creating wrong auth URL for dropbox

When I ask for auth code it sends me to https://www.dropbox.com/oauth2/authorize?client_id=xxxxxxx&response_type=code

But it should be https://www.dropbox.com/oauth2/authorize?client_id=xxxxxxx&response_type=code

Means & is converted to & amp ; (w/o space)

I have checked the source and looks like at /wp-content/plugins/snapshot/lib/Snapshot/Model/Destination/dropbox/index.php line 124 the following line does this change:
wp_redirect( $dropbox_url );

Though before this line, if I print $dropbox_url, I get & not & amp ;

  • Lindeni Mahlalela

    Hello Marcel

    I hope you are doing great today. Thank you for reporting this issue and sorry for the inconvenience that it might have caused.

    I tried to replicate this issue on two of my test sites but I could not, surprisingly I can replicate it on your website. For now I can say this is a site specific issue. I have applied a quick fix on your website by adding the following line of code:

    $dropbox_url = str_replace( "amp;", "", $dropbox_url );

    On line 124 of the file:

    /wp-content/plugins/snapshot/lib/Snapshot/Model/Destination/dropbox/index.php

    After this change, it seems to work fine according to my tests. Please note that this is a temporal fix and may be overridden on the next update of Snapshot. So please remember to apply this fix again after updating so that you may be able to link Dropbox should there be a need to.

    I gathered from the conversation history you had with one of my colleagues that you were going to perform a conflict test. Would you mind sharing the results if you did so that we may have a clue what's going on?

    I hope this helps, please let us know if you have any further questions or concerns, we will always be happy to assist you.

    Have a nice day.
    Mahlamusa

  • Lindeni Mahlalela

    Hello Marcel

    I hope you are doing great today. We have done further investigation on this issue and we have found the real problem and found a better solution explained in detail on this post: https://premium.wpmudev.org/forums/topic/authorization-dropbock?replies=7#post-1286962

    I have also applied the fix on your website and it should work fine from now on. Please let us know if you need any further assistance wit regards to this issue.

    Have a nice day.
    Mahlamusa

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.