[9.100][BUG] Executive Report - Chart Graphics Broken on Apple Devices

Hello,

I'm fighting with this bug for several months now, never knew why it happend and though it was an Apple bug, but I finally stumbled over the cause and a solution in an Apple discussion forum.


When you open the Apple mail app on any iOS device (iPhone, iPad) or Mac Mail on any other Apple computer (Macbook, etc.) you will get wrong graphics if you open more than one executive report.

Example: If you open your last ten executive reports, only the first one is displayed correctly. The other nine will display the charts from the first report. When you close the mail app, start it again and open the second report, the charts are correct for this report. If you open the first record again, you will have the charts from the second report, and so on...

Because you normally don't "really" close the mail app on an iOS device (it stays opened in the background) you will get wrong graphics every day. I just noticed this bug because I knew I rebooted my ASG on one day but couldn't find any sign of it in the charts of the next report.

The bug is that in the HTML code of the Executive Reports the "Content-ID" is used wrong.








This is the code section of the first three charts of the executive report showing CPU-Usage, Memory/Swap Usage and Partition Usage. You'll see that the content-id is "cid:cpuusage_daily.png" for CPU-usage. Unfortunately it's the same CID on every report every day.

That is the bug. As of RFC2111 the Content-ID has to be globally unique, and not just for a single email!

The Mail App will search it's cache for the CID and will show the wrong chart on the next report, because it thinks that it was loaded before with the first report.

Here is the final forum message I found about this problem:

There are a lot of tutorials on embedding images within an html email.  And nearly all of the tutorials used "image1" as the Content-ID of the embedded image.  When the iphone email app sees "Content-ID = " for an embedded image in two emails, it thinks they're the same image, so it displays the cached version of the image.  Unfortunately none of the tutorials stated that the Content-ID had to be globally unique, so most people think it just has to be unique to the email.

However, to fix this issue for my company, I had to change the "Content-ID" of the embedded image to something globally unique, and then my iPhone started recognizing that the images we indeed different.  


To maintain the descriptive filenames I would suggest to just attach a random number to each graphic file like "cid:cpuusage_daily_1548256654.png" or something.

Hope this helps.

Dino