Part of the EllisLab Network
   
 
XSS filter problem
Posted: 06 June 2008 01:22 AM   [ Ignore ]  
Summer Student
Total Posts:  23
Joined  03-19-2008

I am not sure whether this is a desired result, but when I have input in the following form

<script whatever text strings follow >

retrieving the following

$this->input->post('the_field', TRUE);

will return an empty string but it passes the validation rule ‘required’. I tested the following string

<script some valid search strings
<script asdfjasdklfjasdklfj als>

to search in this forum and I get error for search terms that are too short

Profile
 
 
Posted: 06 June 2008 01:28 AM   [ Ignore ]   [ # 1 ]  
Sr. Research Associate
RankRankRankRankRank
Total Posts:  2856
Joined  07-14-2006

what if you add xss in front of the required rule in your validation. The xss in the input->post is a pre validation action that is why the required rule is valid but you get an empty string.

Profile
 
 
Posted: 06 June 2008 01:37 AM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  23
Joined  03-19-2008
xwero - 06 June 2008 01:28 AM

what if you add xss in front of the required rule in your validation. The xss in the input->post is a pre validation action that is why the required rule is valid but you get an empty string.

thanks for the information, so this means input->post(’...’, TRUE) does the xss filtering after going though the defined rules?

Profile
 
 
Posted: 06 June 2008 01:50 AM   [ Ignore ]   [ # 3 ]  
Sr. Research Associate
RankRankRankRankRank
Total Posts:  2856
Joined  07-14-2006

Yes if you want it before the validation you can add the xss ‘rule’ as i suggested or set the the global xss filtering to true

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 719, on June 06, 2008 10:16 AM
Total Registered Members: 61059 Total Logged-in Users: 19
Total Topics: 73867 Total Anonymous Users: 1
Total Replies: 398462 Total Guests: 341
Total Posts: 472329    
Members ( View Memberlist )
Newest Members:  bnolenstanjadebieSan2kakifemreSchottec2kmeenazterjinFuadgeorge_k_allis