View Issue Details

IDProjectCategoryView StatusLast Update
0032459mantisbtbugtrackerpublic2024-02-19 19:08
Reporterdevnull Assigned Toatrol  
PrioritylowSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version2.25.7 
Target Version2.25.8Fixed in Version2.25.8 
Summary0032459: Graphics x Apple Safari 16
Description

Hi folks,

I don't know if it is necessary a mantisbt bug/incompatibility, or an Apple Safari issue.
If don't, please close this bug.

In Summary --> Graphs, the graphics don't show in Apple Safari.
If I inspect the page, I see the error "Refused to execute https://apt322.org/abc71/tickets/plugin_file.php?file=MantisGraph/Chart-2.9.4.min.js as script because X-Content-Type-Options: nosniff" was given and its Content-Type is not a script MIME type"

In my apache, I dont have X-Content-Type-Options activated.

In Google Chrome and Firefox, the graphics show me perfectly fine. If I inspect the page, none warning or error.

Only in Apple Safari the graphics don't and I see this error if I inspect the page.

Steps To Reproduce

Go to summary --> graphs

Additional Information

I'm using Apple Safari 16.3

TagsNo tags attached.
Attached Files
screen.png (357,605 bytes)

Activities

atrol

atrol

2023-04-29 09:13

developer   ~0067720

Last edited: 2023-04-29 10:19

Does it work, if you change line 189 in file .../plugins/MantisGraph/MantisGraph.php
from
printf( "\t<script src=\"%s\"></script>\n",
to
printf( "\t<script type=\"text/javascript\" src=\"%s\"></script>\n",

devnull

devnull

2023-04-29 17:17

reporter   ~0067722

Last edited: 2023-04-29 17:20

Thanks atrol, it worked!

I don't know why "script type=\"text/javascript\"" is required to work in Apple Safari, is it not implied?

As far as I know, Safari 16.3 fully support HTML5 =/

dregad

dregad

2023-04-29 18:27

developer   ~0067723

Using Safari 16.4 on my macbook, I have no difficulties viewing Graphs on this tracker or on a local fresh install, without having to change the source code.

atrol

atrol

2023-04-29 19:00

developer   ~0067725

Last edited: 2023-04-29 19:00

I was also not able to reproduce using Safari 16.4,

I have no difficulties viewing Graphs on this tracker

@dregad we have $g_cdn_enabled = ON; on this tracker, I guess @devnull that adding this line to your config_inc.php would also solve your issue.

@dregad we use text/javascript in other places in code, e.g. html_javascript_cdn_link.
Do you agree, that we should do it the same way in whole code?

Opened PR for it https://github.com/mantisbt/mantisbt/pull/1884

dregad

dregad

2023-04-29 19:29

developer   ~0067726

we have $g_cdn_enabled = ON; on this tracker

I have it OFF on my dev box, yet graphs are displayed correctly.

we use text/javascript in other places in code, e.g. html_javascript_cdn_link.
Do you agree, that we should do it the same way in whole code?

I suppose it does not hurt to add it, but I'd like to understand why it's working for you me without it, and not for @devnull.

atrol

atrol

2023-04-30 04:52

developer   ~0067731

but I'd like to understand why it's working for you me without it ...

Same for me, at the moment I see just Safari 16.3 vs. Safari 16.4
@devnull are you able to upgrade to Safari 16.4?

Related Changesets

MantisBT: master-2.25 c9bb34d4

2023-04-29 10:23

atrol


Details Diff
Add script type to MantisGraph JavaScript links

Fixes 0032459
Affected Issues
0032459
mod - plugins/MantisGraph/MantisGraph.php Diff File

MantisBT: master a254b244

2024-02-19 19:08

atrol

Committer: community


Details Diff
Revert unrelated changes to prevent a regression

Changes for issue 0033521 introduce a regression.
Without undoing, we will get again issue 0032459.
Affected Issues
0032459, 0033521
mod - plugins/MantisGraph/MantisGraph.php Diff File