MyBB Community Forums

Full Version: Is myBB parsing &hash=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
Is myBB parsingĀ 


&hash=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx


in img src tags?

I am not get a script to load in either the templates nor the myCode
[Image: mascot.png?foo=bar&hash=xxxxxxxxxxxxxxxx...xxxxxxxxxx]

Working fine here. Are you sure it's an image you're loading and not a webpage displaying an image?
Yeah, can you post the link to the image you're trying to us here?
MyBB doesn't alter the image source in any way nor does it download it. Make sure that the server you are loading the image from isn't hotlink protected, a .htaccess issue on their end could very well lead to this. The easiest way is to open Dev Tools in either google Chrome or Firefox, go to the network tab and press F5. Use the search bar to search for the name of the image and inspect the response headers on the right side. Check the response code (should be "200" if you press F5) and content length (something in the thousands).
but how do you know its NOT just ignores the hash and displays the img anyways?
(2015-10-16, 06:29 AM)expat Wrote: [ -> ]but how do you know its NOT just ignores the hash and displays the img anyways?

[attachment=35376]

The hash is definitely included.

Try it yourself on your own forum:

[img]http://www.mybb.com/assets/images/mascot.png?foo=bar&hash=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[/img]
[Image: mascot.png&hash=6c142d32eddc6c8a8e1b480706977795]

No it doesnt work
Because that's not a valid URL. The first URL parameter must be prepended with a question mark, and any additional parameters must be pretended with an ampersand (&).

E.g.

[img]http://www.mybb.com/assets/images/mascot.png?hash=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[/img]

or

[img]http://www.mybb.com/assets/images/mascot.png?foo=bar&hash=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[/img]

Your issue could be solved in a single post if you just tell us what image you're trying to link to.
ok i have a php script to resize the image

http://myScript.php?src=http://www.mybb.com/assets/images/mascot.png&hash=6c142d32eddc6c8a8e1b480706977795

apparently it needs the hash so not to be hacked to pieces

if i turn off the hash function in config and still leave the hash in html it works....if i turn on the hash function, then it returns a error image, as if the hash is NON-existant
you need to url encode it. http://www.url-encode-decode.com/

http://myScript.php?src=http%3A%2F%2Fwww.mybb.com%2Fassets%2Fimages%2Fmascot.png&hash=6c142d32eddc6c8a8e1b480706977795

https://en.wikipedia.org/wiki/Percent-encoding
Pages: 1 2 3 4 5