Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bbPress formatting issue #347

Closed
romik84 opened this issue Apr 16, 2016 · 25 comments
Closed

bbPress formatting issue #347

romik84 opened this issue Apr 16, 2016 · 25 comments

Comments

@romik84
Copy link

romik84 commented Apr 16, 2016

Hi,

new version 2.8.3 strip formatting of the bbPress threads and it displays in a plain text. Thanks.

@alexstine
Copy link

Hello,
Same problem here, possible issue in code can be located below.
https://wordpress.org/support/topic/crayon-plugin-strips-tags-on-my-forum-content#post-8288720

Thanks.

@aramk
Copy link
Owner

aramk commented Apr 25, 2016

The removal of the tags was in response to the plugin being pulled due to a potential XSS (Cross-Site Scripting) issue. If a script tag or attribute is included in the tags, it can execute this when the page renders. I'll need to work towards a solution to allow all safe tags.

@alexstine
Copy link

@aramk
Copy link
Owner

aramk commented May 2, 2016

Ideally I'd like to blacklist any event attributes like onload and not whitelist all possible tags, since this would tamper less with user input.

@alexstine
Copy link

Hello,
True, however, I would not know how to do this in PHP, this seems like a quick fix until we can figure something else out.

Thanks.

@aramk
Copy link
Owner

aramk commented May 2, 2016

Can you download the zip for 9e47ee4 and give it a go? It should only scrape script tags and event attributes which is sufficient to prevent XSS attacks I think.

@alexstine
Copy link

Hello,
I will try to test it on my test site by the end of the week.

Thanks.

@alexstine
Copy link

Hello,
Where and how do I download this .zip folder?

Thanks.

@aramk
Copy link
Owner

aramk commented May 3, 2016

You can find it on the main github page for the project. The direct link is here: https://github.com/aramk/crayon-syntax-highlighter/archive/master.zip

@aramk
Copy link
Owner

aramk commented May 6, 2016

I've had another user verify by email that the fix worked. I'll wait for a few others to confirm here before releasing.

@alexstine
Copy link

Hello,
Sorry for being lazy and not getting this tested as fast. It seems to be working, I would go ahead and push the update. Then you can let the users point out anymore bugs. With that line of code commented, that leaves your site open to all kinds of bad code.

Thanks.

@aramk
Copy link
Owner

aramk commented May 7, 2016

Would be able to test the latest download again? I've made a further change to return plain text from the AJAX call, but it shouldn't affect the bbPress highlighting which is still working for me.

@alexstine
Copy link

Hello,
I just used your link above to download it again. I am guessing this is what you wanted us to test. I will test this in the next couple of hours and post back.

Thanks.

@alexstine
Copy link

Hello,
I just tested it from the link above, now this error is showing.

Warning: Missing argument 2 for CrayonUtil::strip_event_attributes(), called in /public_html/wp-content/plugins/crayon-syntax-highlighter/crayon_wp.class.php on line 204 and defined in /public_html/wp-content/plugins/crayon-syntax-highlighter/util/crayon_util.class.php on line 851

Thanks.

@aramk
Copy link
Owner

aramk commented May 7, 2016

Thanks for testing. I've fixed that issue. That was a warning so it should otherwise be working?

@alexstine
Copy link

Hello,
Yes, it is working. Should I download and install the latest version again so that warning goes away?

Thanks.

@aramk
Copy link
Owner

aramk commented May 7, 2016

Great! Up to you, but I should be able to publish this soon. Waiting on
feedback from one more person.

On Sun, May 8, 2016 at 12:56 AM Alex S notifications@github.com wrote:

Hello,
Yes, it is working. Should I download and install the latest version again
so that warning goes away?

Thanks.


You are receiving this because you commented.

Reply to this email directly or view it on GitHub
#347 (comment)

@alexstine
Copy link

Hello,
Alright, sounds good. I will go ahead and install the latest version to make the warning go away and check just to make sure everything is working good.

Thanks.

@alexstine
Copy link

Hello,
Just checked again, now the warning is gone.

Thanks.

@alexstine
Copy link

Hello,
Um, the update you released tonight has a major problem that needs to be fixed immediately. The update strips the paragraph tag from the BBPress topic and reply content.

Could you please look in to this? The beta version worked fine, you release the update and it screws up my forum. Not cool.

Thanks.

@aramk
Copy link
Owner

aramk commented May 8, 2016

Hi, 2.8.3 is still the latest version released through Wordpress plugins. I haven't released anything yet. I suspect you updated back to this version from the 2.8.4 beta. Since the beta is not released, it will ask you to update to the latest (2.8.3) which reverted the fixes in 2.8.4 beta.

@alexstine
Copy link

Hello,
That makes since. Please update this when you push the new version out.

Thanks.

@harrymilatz
Copy link

Hello,

will be there an update (maybe just update the readme.txt) to WordPress 4.5.x?

I found no issue at the moment, so it could be enough to change the "tested up to" in the readme.txt

In the last updates the "tested up to" tag wasn't changed.

Best regards,
Harry

@aramk
Copy link
Owner

aramk commented May 11, 2016

Updated this in e881910. Version 2.8.4 has been released.

@aramk aramk closed this as completed May 11, 2016
@luxint66
Copy link

Thanks for the update. It's not stripping html from my forum now but it is stripping jwplayer <script> tags. Is there a way to whitelist certain tags without hacking the code?

Thanks

Lux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants