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

Reply button with usernames containing quotes #1774

Closed
euantorano opened this issue Jan 18, 2015 · 11 comments
Closed

Reply button with usernames containing quotes #1774

euantorano opened this issue Jan 18, 2015 · 11 comments
Assignees
Labels
b:1.8 Branch: 1.8.x s:resolved Status: Resolved. Solution implemented or scheduled t:bug Type: Bug. An issue causing error / flaw / malfunction
Milestone

Comments

@euantorano
Copy link
Member

When using the reply button to quote a post, the quote MyCode inserted in the editor is wrong if the quoted user has an apostrophe in their username.

Example: Username: "Fardel's Bear"
Action: Click Reply on a post by the user
Created quote code in the full editor:

[quote=Fardel pid='1' dateline='1421574511']
This is a test post for testing MyAlerts...
[/quote]

I've not looked at the code, but I can confirm this on a fresh install of the current dev version of MyBB 1.8 and a live forum running 1.8.3.

Original thread: Reply button with usernames containing quotes

@euantorano euantorano added t:bug Type: Bug. An issue causing error / flaw / malfunction s:confirmed Status: Confirmed. Retested and found the issue exists b:1.8 Branch: 1.8.x labels Jan 18, 2015
@euantorano euantorano added this to the 1.8.5 milestone Jan 18, 2015
@euantorano euantorano self-assigned this Jan 18, 2015
@euantorano
Copy link
Member Author

Fix:

inc/functions_posting.php line 218: add before return:

$quoted_post['username'] = addslashes($quoted_post['username']);

@Eldenroot
Copy link
Contributor

This should be fixed in MyBB 1.8.4 - because this bugs affects some plugins

@Sama34
Copy link
Contributor

Sama34 commented Jan 20, 2015

Which plugins?

@Eldenroot
Copy link
Contributor

@Sama34 - for example all plugins for quick (fast) quotes

@Destroy666x
Copy link
Contributor

It doesn't matter that it affects plugins too.. The biggest problem which might move this issue to 1.8.4 is that it affects the core itself. The fix above (if it's valid, it looks like it is) could be made into PR to ensure that.

@euantorano
Copy link
Member Author

@Destroy666x the above fix is not complete. Unfortunately when the quote is saved, some other processing seems to happen. I haven't had a chance to look at what else is going wrong yet.

@Sama34
Copy link
Contributor

Sama34 commented Jan 21, 2015

If this is a SCEditor issue we can probably ask the developers.

@JN-Jones JN-Jones modified the milestones: 1.8.5, 1.8.6 Apr 30, 2015
@Destroy666x Destroy666x added the p:medium Priority: Medium. Issues to be resolved with normal preference label Aug 4, 2015
@JN-Jones JN-Jones modified the milestones: 1.8.6, 1.8.7 Aug 26, 2015
@Stefan-MyBB Stefan-MyBB modified the milestones: 1.8.7, 1.8.8 Mar 2, 2016
@Stefan-MyBB Stefan-MyBB modified the milestones: 1.8.8, 1.8.9 Aug 31, 2016
@JN-Jones
Copy link
Contributor

@euantorano Have you ever looked into this?

@euantorano
Copy link
Member Author

I had a brief look and couldn't work out where it was going wrong. I'll have a look this weekend.

@Stefan-MyBB Stefan-MyBB modified the milestones: 1.8.9, 1.8.10 Dec 15, 2016
@Stefan-MyBB Stefan-MyBB modified the milestones: 1.8.10, 1.8.11 Jan 8, 2017
@WildcardSearch
Copy link
Contributor

The problem is that in functions_posting.php's parse_quoted_message, single quotes are used without checking to see if the user name contains single quotes.

@WildcardSearch
Copy link
Contributor

This is a simple fix. Can anyone test #2624 ?

Shade- added a commit that referenced this issue Feb 4, 2017
@Shade- Shade- added s:resolved Status: Resolved. Solution implemented or scheduled and removed p:medium Priority: Medium. Issues to be resolved with normal preference s:confirmed Status: Confirmed. Retested and found the issue exists labels Feb 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
b:1.8 Branch: 1.8.x s:resolved Status: Resolved. Solution implemented or scheduled t:bug Type: Bug. An issue causing error / flaw / malfunction
Projects
None yet
Development

No branches or pull requests

8 participants