• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed Copy/Paste Image Location With Proxy Results In Long Link

Snog

Well-known member
#1
Really something odd, but if an images location is repeatedly copied and pasted to different threads with the image proxy enabled, you end up with a huge proxy link.

From what I can tell this one has been copied and pasted at least 3 times...
Code:
https://xxxxxx.com/proxy.php?image=https%3A%2F%2Fxxxxxx.com%2Fproxy.php%3Fimage%3Dhttps%253A%252F%252Fxxxxxx.com%252Fproxy.php%253Fimage%253Dhttp%25253A%25252F%25252Fxxxxxx.com%25252Fproxy.php%25253Fimage%25253Dhttp%2525253A%2525252F%2525252Fwww.imgion.com%2525252Fimages%2525252F01%2525252FYellow-Star-with-Congratulation-.png%252526hash%25253D8f5d9098369219ca7f2f6fc5251b7092%2526hash%253D643bb29c6c29ec4d573903550c449809%26hash%3D9ceba249255877be970cfe8ecde92f59&hash=e687cd8be44c7e92300dd5755016b3e2
And from what I can tell, proxy.php is processed for each iteration.
 
Last edited:

Mike

XenForo developer
Staff member
#3
I've worked around this by having proxy.php essentially resolve the recursive calls as far as it can. This prevents a cascade of calls being necessary; one request will load the image from the remote server.

I've also made a change that should prevent the recursion from happening in the first place, though it may make a single proxy call. We have a situation where we do try to resolve it, but it won't necessarily apply to all scenarios. Applying a filter to de-proxy any image calls within a post is much more viable in XF2.