View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0024233 | mantisbt | markdown | public | 2018-04-06 15:32 | 2018-04-29 19:21 |
Reporter | j_schultz | Assigned To | atrol | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 2.12.1 | ||||
Target Version | 2.13.2 | Fixed in Version | 2.13.2 | ||
Summary | 0024233: Markdown quoting rendered with broken HTML | ||||
Description | Using markdown quotes in generates broken HTML output in Mantis 2.13. It looked okay in Mantis 2.12. | ||||
Steps To Reproduce |
Test. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
related to | 0024202 | closed | atrol | Broken rendering of @ mentions, # issue and ~ note links |
related to | 0024186 | closed | dregad | CVE-2018-1000162: XSS vulnerability in Parsedown library |
related to | 0024241 | assigned | dregad | $g_html_valid_tags are not rendered if Markdown is enabled |
related to | 0024240 | closed | dregad | XML in Markdown Code ist not rendered correct |
related to | 0022190 | resolved | community | Markdown markup should be done with CSS classes, not inline styles |
Okay so the problem does not appear to happen here for some reason... The generated HTML looks like this on my Mantis instance: |
|
And apparently quoting HTML inside markdown makes it even more broken, so I guess I'll have to resort to a screenshot instead: |
|
Same on my test system using version 2.13.1 and Markdown enabled. Maybe you have installed some 3rd party plugins or changed original source of Mantis? |
|
I re-downloaded the mantis 2.13.1 zip just to be sure, and disabled my self-written plugin just to be sure, but no change in output. |
|
This is happening to me too. I started a discussion here: https://mantisbt.org/forums/viewtopic.php?f=2&t=25469 It was not like this with the last version I was using 2.12.0 so it is not caused by plugins. For me, it seems that the quotes and the left chevron are not displaying right. |
|
I'm running PHP 5.6 on Debian Jessie, in case that might make a difference. |
|
It also seems like html tags are not rendered at all even when they are whitelisted. |
|
My site is hosted with one.com and it too is using PHP 5.6. Eitherway the rendering was fine with version 2.12.0 and now with 2.13.1 it is not so something has to have changed somewhere. |
|
My local XAMPP with exactly the same Mantis install but PHP 7 doesn't seem to have the Markdown problem; but this instance, too, does not render any of the |
|
I just updated my domain to PHP 7 (about 20 minutes ago) but no joy ... |
|
I think there are two (possibly related) issues: The first one that misrenders blockquotes, and the one that turns < and & into their HTML entities; the first issue might be resolved by upgrading to PHP7, the second does not (see also my first comment above, it still has the issue even here on the issue tracker.) |
|
I am not able to reproduce using PHP 5.6.32
Confirmed
Confirmed |
|
@atrol Do you have any suggestions how I could possibly debug the blockquote issue? As said the source code is not modified, and disabling my self-written plugin does not fix it, and removing most of my config_inc.php also does not help. So I wonder which remaining variables there are that could influence this behaviour... |
|
Another update: I imported my live database into the XAMPP installation. Now both the files and the database match, and I have the same blockquote rendering issue on both systems. So it must be a database value that's causing the issue...? |
|
Duh... It's more simple than I thought: My previous test install didn't have issue #777. And on this very instance of MantisBT, issue #777 seems to be missing as well. If your own test install also doesn't have issue #777, you will also not see the issue. So to reproduce the issue, you need an installation where issue #777 exists. |
|
Notice how #777 is not turned into a clickable link in my previous comment; this is why it works on this issue tracker. But if issue #777 existed, I am sure the blockquote bug would also show up here. |
|
Confirmed |
|
Sorry to say, there is no quick solution for that, as there is a conceptual problem. I recommend to go on using 2.12.0 until there is a fix for it. |
|
But what about my database? I alas did not back it up although I can request a image restore from my host. Can I use current database and just rename my path to previous version? |
|
No worries, you can. |
|
@j_schultz if you want to go on using 2.13.1, as a workaround for the blockquote issue, change the following line (should be 172) in plugins/MantisCoreFormatting/core/MantisMarkdown.php from
to |
|
@atrol wrote:
Thanks. I have reverted to 2.12.0 until I hear otherwise. |
|
Just be aware of the XSS vulnerability fixed by 0024186 - you may want to consider temporarily disabling markdown. |
|
@dregad But for how long? |
|
If I disable markdown then I just as well use 2.13.1 :) |
|
Why can't I edit my notes here? I get access denied when I try to view: https://www.mantisbt.org/bugs/view.php?id=24186 |
|
Apologies, I forgot to set it to public after 2.12.1 was released. Fixed now.
That was the idea ;-)
Unfortunately I lost my crystal ball, so I can't tell... But considering the severity of this issue, I hope we can fix it quickly.
We use the default setting for _update_bugnotethreshold... I guess it would make sense to change it to REPORTER. |
|
Thanks.
I have reverted to 2.13.1 so how do I temporarly disable markdown? I also have two plugins
|
|
Just go to Manage / Plugins / MantisBT Formatting and set Markdown Processing to Off. As for the other plugins, I don't use them so I don't know for sure, but you should be able to simply Uninstall them. |
|
OK, well, I have switched if off and uninstalled the plugins. Understandably I would like to switch it back on as soon as possible as many of the issues look "ugly" noew with all the raw markdown. |
|
I agree that it's ugly, but probably better than having a gaping XSS security hole ;-) We'll do our best to fix it quickly |
|
Set |
|
You want me to download 2.12.1 and stick with that (with markdown disabled)? |
|
Created 0024241 to follow up the 0024233:0059464 The HTML rendering issue 0024233:0059455 should be covered by 0024240. So let's use this issue just to track the quote issue which is reproducible if issue with number 777 does exist. |
|
No, 2.12.1 is bad and 2.13.1 is also bad in terms of Markdown. |
|
MantisBT: master-2.13 88913cb3 2018-04-11 00:13 Details Diff |
Use rgb color values for Markdown quote styling Workaround as using hex values for colors starting with # introduces unwanted side effects. Fixes 0024233 |
Affected Issues 0024233 |
|
mod - plugins/MantisCoreFormatting/core/MantisMarkdown.php | Diff File |