Weird picture bug

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
User avatar
pm4eva
Moonbather
Moonbather
Posts: 74
Joined: 2018-06-12, 10:26
Location: CET

Weird picture bug

Unread post by pm4eva » 2018-06-12, 13:58

Hello it is my first post and i hope you can understand my english.

The problem i have is within a forum.
If i use the old PM for XP or Firefox or chrome the pictures are visible.
Just with the new versions of PM (32 bit) i can not see it.

There you can upload all kind of sizes. But if a user has uploded a avatar pic biger than 92x92px the pics arent shown if the forum software resizes it into smaller output.

i tested a blank new portable version of PM to without any changes or addons.
It does not work.

You can try it here
https://www.computerbase.de/forum/threa ... n.1573670/
Move your mouse over the Nickname Steffen and a popup will be shown. But in the left corner should be a small avatarpic.
With other browsers you can see it.

Thats all what i did find out. I hope you can help and fix that bug.
Thank you and greets.
Last edited by pm4eva on 2018-06-12, 22:56, edited 1 time in total.

User avatar
Tomaso
Board Warrior
Board Warrior
Posts: 1622
Joined: 2015-07-23, 16:09
Location: Norway

Re: Weird picture bug

Unread post by Tomaso » 2018-06-12, 15:31

This already works with Pale Moon UXP.
Try the latest unstable build.

User avatar
pm4eva
Moonbather
Moonbather
Posts: 74
Joined: 2018-06-12, 10:26
Location: CET

Re: Weird picture bug

Unread post by pm4eva » 2018-06-12, 22:59

Oh its not a big problem. I can wait til that bug is maybe fixed in the next stable version.

I only tested it under Windows 32 bit and not under Linux 64 bit.
Maybe u could check that out.

Thanks and greets
thx and greets

User avatar
Night Wing
Knows the dark side
Knows the dark side
Posts: 5146
Joined: 2011-10-03, 10:19
Location: Piney Woods of Southeast Texas, USA

Re: Weird picture bug

Unread post by Night Wing » 2018-06-12, 23:26

It doesn't show in 64 bit linux Pale Moon 27.9.3 either.
Linux Mint 21.3 (Virginia) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox
MX Linux 23.2 (Libretto) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox
Linux Debian 12.5 (Bookworm) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox

User avatar
therube
Board Warrior
Board Warrior
Posts: 1648
Joined: 2018-06-08, 17:02

Re: Weird picture bug

Unread post by therube » 2018-06-13, 00:40

Yet it does in 27.9.1 x64, Windows.

Why differing results?
Have others (other then the OP, because he did), where it fails, tested in a new, clean Profile?


@OP, just what version of PM are you running?
Last edited by therube on 2018-06-13, 00:43, edited 2 times in total.

Frasier
Lunatic
Lunatic
Posts: 252
Joined: 2014-05-07, 02:44
Location: Indiana

Re: Weird picture bug

Unread post by Frasier » 2018-06-13, 04:05

Mixed revues?:
Nick_Steff.jpg
Nick_Steff.jpg (13.6 KiB) Viewed 1729 times
Nick_O-Saft.jpg
Nick_O-Saft.jpg (18.49 KiB) Viewed 1729 times
Pale Moon 27.9.3(x86) Win 7(x64).

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35402
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Weird picture bug

Unread post by Moonchild » 2018-06-13, 10:15

The problem is a MIME type mismatch.

The server says that the avatar picture is content-type: image/jpeg
But the actual picture is a png file, not a jpg. As such, it's not displayed because it can't be decoded as a jpg.
Last edited by Moonchild on 2018-06-13, 10:16, edited 1 time in total.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
pm4eva
Moonbather
Moonbather
Posts: 74
Joined: 2018-06-12, 10:26
Location: CET

Re: Weird picture bug

Unread post by pm4eva » 2018-06-13, 16:11

I also tried now a JPG with a biger resolutiion. It didnt change anything.
So i believe the newest PM does have a problem.

And btw. do you mean that the server sends wrong information to the browser?
Or does the browser code miss some code lines?

If it is a server problem i could contact the admin there.

Thanks and greets
thx and greets

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35402
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Weird picture bug

Unread post by Moonchild » 2018-06-13, 16:26

The server sends wrong information to the browser.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
therube
Board Warrior
Board Warrior
Posts: 1648
Joined: 2018-06-08, 17:02

Re: Weird picture bug

Unread post by therube » 2018-06-13, 18:50

OK, so it is a png.

https://pics.computerbase.de/forum/avatars/m/0/62.jpg

Yet I see it (in PM 27.9.1)?

And then there is this too, "This already works with Pale Moon UXP".

So is action to be taken, or the action performed to display a picture, on receiving a picture with a wrong mime-type different between PM 27 & UXP?
Does/should Error Console or similar log that discrepancy?


(I'll note that I'm using PM default theme.)
Last edited by therube on 2018-06-13, 18:52, edited 2 times in total.

Steffen

Re: Weird picture bug

Unread post by Steffen » 2018-06-13, 19:13

I'm not a Pale Moon user but the admin of the ComputerBase forum.

It's true that we serve all avatars with the header "Content-type: image/jpeg" regardless of the actual file format. That's because our forum software (XenForo) saves all avatars with a ".jpg" filename extension which nginx uses to determine the MIME type.

That's not something special about XenForo. For example, all vBulletin forums do the same thing (but with ".gif" and "image/gif").

I agree that strictly-speaking this is not correct. But we cannot change this behaviour with reasonable effort and all of the major browsers don't have a problem with this. They are fine as long as an image is served with some "image/*" MIME type. They only complain if an image is served with a non-image MIME type.

Maybe Pale Moon should do the same.

User avatar
pm4eva
Moonbather
Moonbather
Posts: 74
Joined: 2018-06-12, 10:26
Location: CET

Re: Weird picture bug

Unread post by pm4eva » 2018-06-13, 19:28

@therube

I am not sure since which PM version the things have changed.
I now use 27.9.3 and the Forum Software is also pretty new (just some days).
All i did check was the old PM 26.5.0.Atom.WinXP version and with that it worked.
thx and greets

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35402
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Weird picture bug

Unread post by Moonchild » 2018-06-13, 20:51

@steffen: content-type headers are there for a reason. Just because Chrome doesn't care doesn't mean we should ignore the html standard.
If a server explicitly indicates a MIME type, the browser should always treat the content as that MIME type.

If XenForo is "special" in that it's broken that way, then the devs of that forum software should fix it already.
Last edited by Moonchild on 2018-06-13, 20:54, edited 2 times in total.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
therube
Board Warrior
Board Warrior
Posts: 1648
Joined: 2018-06-08, 17:02

Re: Weird picture bug

Unread post by therube » 2018-06-13, 23:44

therube wrote:Yet it does in 27.9.1 x64, Windows.
therube wrote:Yet I see it (in PM 27.9.1)?
So I look again, & guess what, now I do not see it.


(Did something change? Doubtful.
In that case, I think I made a really stupid blunder!
Won't be the first. Won't be the last ;-).)

User avatar
pm4eva
Moonbather
Moonbather
Posts: 74
Joined: 2018-06-12, 10:26
Location: CET

Re: Weird picture bug

Unread post by pm4eva » 2018-06-14, 12:13

@moonchild
thanks for your explanation
thx and greets

Steffen

Re: Weird picture bug

Unread post by Steffen » 2018-06-14, 12:25

I get your point about Content-Type headers being there for a reason. But as I said we cannot modify such a fundamental part of XenForo for the benefit of a single user.

When I said "major browsers" I wasn't only talking about Chrome but literally about all major browers: Chrome, Firefox, Edge, Internet Explorer, Opera, and Safari. All of them are working fine. Pale Moon is probably the only browser with such a strict Content-Type handling for images. Furthermore, this issue does not only affect XenForo but all vBulletin boards, too.

I obviously cannot tell you what do to. And I don't want to. I wanted to explain why this issue exists and why I think Pale Moon should change (instead of all vBulletin and XenForo boards). If you disagree then that's fine for me.
Last edited by Steffen on 2018-06-14, 12:26, edited 1 time in total.

GMforker

Re: Weird picture bug

Unread post by GMforker » 2018-06-14, 13:06

pm4eva wrote:You can try it here
https://www.computerbase.de/forum/threa ... n.1573670/
Move your mouse over the Nickname Steffen and a popup will be shown. But in the left corner should be a small avatarpic.
This problem is related to Pale Moon 27.8.3+
- see http://www.palemoon.org/releasenotes.shtml and:
This is a small update to address a pervasive crashing issue.
Backed out some responsive layout code that caused intermittent but not uncommon crashes in the browser depending on window sizes and page content.
Last edited by GMforker on 2018-06-14, 13:07, edited 1 time in total.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35402
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Weird picture bug

Unread post by Moonchild » 2018-06-15, 01:22

@Steffen: don't do it for one user, do it for RFC2616, section 7.2.1:
Any HTTP/1.1 message containing an entity-body SHOULD include a Content-Type header field defining the media type of that body. If and only if the media type is not given by a Content-Type field, the recipient MAY attempt to guess the media type via inspection of its content and/or the name extension(s) of the URI used to identify the resource. If the media type remains unknown, the recipient SHOULD treat it as type "application/octet-stream".
Seriously, being RFC compliant in this respect is a good thing. the standard says a browser is not allowed to sniff content or look at a file extension if a Content-Type header is present. If you want browsers to sniff the data, DO NOT send the Content-Type header if your forum software does not know it.
If the tipping point is the change GMForker indicated, then it is because of the allowed use of "picture" elements which avoid this broken path in the XenForo software.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
pm4eva
Moonbather
Moonbather
Posts: 74
Joined: 2018-06-12, 10:26
Location: CET

Re: Weird picture bug

Unread post by pm4eva » 2018-06-15, 13:26

Hm, if i now think about all, can it be that the most forum softwares (or servers) are a little buged?

I mean, if a pic is a PNG why does that software not send the right mime-type as PNG or whatever?
And why does one of them fake it?

That must have a reason why.

And JPG does not support transparency. So i would generally use PNG.
But thats just my personal opinion.
Last edited by pm4eva on 2018-06-15, 13:47, edited 11 times in total.
thx and greets

User avatar
adesh
Board Warrior
Board Warrior
Posts: 1277
Joined: 2017-06-06, 07:38

Re: Weird picture bug

Unread post by adesh » 2018-06-16, 09:57

pm4eva wrote:That must have a reason why.
Off-topic:
Writing good software is hard! Same reason good and mindful people are a minority, like Pale Moon.
Last edited by adesh on 2018-06-16, 09:59, edited 2 times in total.

Locked