Skip to content

Conversation

@prodigysml
Copy link

Added in HTML Encoding for all echo statements. This should take care of any XSS issues that are within the software.

Added in HTML Encoding for all echo statements. This should take care of any XSS issues that are within the software.
@prodigysml prodigysml mentioned this pull request Jun 15, 2017
@JustinStolle
Copy link
Contributor

Not sure why, but this is what I see when using your copy of the file, @prodigysml .
problem

@prodigysml
Copy link
Author

My bad. Probably over sanitised sections. Looking into fixing it.

…o work, but that is if the table or the database contacts special character (like <> ). I feel that it shouldn't be a problem as the most likely users of such characters are probably people trying to exploit that application.
@prodigysml
Copy link
Author

@JustinStolle Just added in a patch for that. Should be patched, but still has a bit of a problem if someone uses things like chevrons (<>)

Copy link
Owner

@osalabs osalabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please change the following:

  1. use already existing function hs() instead of htmlentities() for sanitizing strings
  2. remove unnecessarily added spaces (I am just trying to keep file size as small as possible)

@prodigysml
Copy link
Author

@osalabs Thanks for that! I made the change to use hs now. Also fixed up the spaces issue.

Copy link
Owner

@osalabs osalabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still have issues with the patch while testing.

  1. Try this - create the following table:
CREATE TABLE `<b>bold</b>` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `<i>italic</i>` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8

and try to use all functions.
For example, when I do "show tables" and then click on table name - it displays error, while it should select from table.

  1. you can also create a database with name containing special html chars and test if it works

  2. and eo() is not necessary in ex_w() because ex_w used only in export and should not escape chars

Please review your changes again.

@osalabs osalabs closed this Jul 30, 2017
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

Successfully merging this pull request may close these issues.

3 participants