<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Core Framework</title><link>http://www.dotnetnuke.com/tabid/795/Default.aspx</link><description>Discussions of the DotNetNuke core framework.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: validating user input and PortalSecurity.InputFilter?</title><link>http://forums.asp.net/thread/1162813.aspx</link><pubDate>Mon, 09 Jan 2006 12:07:46 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1162813</guid><dc:creator>EmperorWal</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1162813.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=97&amp;PostID=1162813</wfw:commentRss><description>&lt;p&gt;I did a little more homework. &lt;/p&gt;
&lt;p&gt;Here is a quick test for you all. &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Set up the standard DNN FAQ module on a page.&lt;/li&gt;
&lt;li&gt;Edit the module settings and grant Edit Permissions to all users.&lt;/li&gt;
&lt;li&gt;Go to the FAQ module as a non-admin user.&lt;/li&gt;
&lt;li&gt;Select Add a new FAQ.&lt;/li&gt;
&lt;li&gt;For Question or Answser: Set the Texteditor to&amp;nbsp; "Basic Text Box", then text mode to "Raw" &lt;/li&gt;
&lt;li&gt;Enter a Question like &amp;lt;SCRIPT&amp;gt;alert('hello');&amp;lt;/SCRIPT&amp;gt;&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;It seems that many (if not all) modules in DNN are presently designed to trust user input. Anyone building a large portal where a large group of users is allowed to edit certain modules must be carfeul. Before&amp;nbsp;you grant edit permission on any module to a group of users, you may want to test each input with a simple &amp;lt;SCRIPT&amp;gt; payload.&lt;/p&gt;</description></item><item><title>Re: validating user input and PortalSecurity.InputFilter?</title><link>http://forums.asp.net/thread/1158264.aspx</link><pubDate>Wed, 04 Jan 2006 02:15:29 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1158264</guid><dc:creator>EmperorWal</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1158264.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=97&amp;PostID=1158264</wfw:commentRss><description>&lt;p&gt;I did more homework on this issue and I think that DNN sites that grant broad sets of users Edit permissions on some modules may need to tighten up the input and output handling on those modules. It appears that many modules are not encoding or filtering user input before displaying it.&lt;/p&gt;
&lt;p&gt;I'm interested in what other people are doing. I wrote up some of what I learned at &lt;a href="http://www.accidentalarchitect.com/Home/tabid/68/EntryID/19/Default.aspx"&gt;http://www.accidentalarchitect.com/Home/tabid/68/EntryID/19/Default.aspx&lt;/a&gt;&amp;nbsp;and put a little demo of what I think is a good way to encode and filter user input at &lt;a href="http://www.accidentalarchitect.com/encode.aspx"&gt;http://www.accidentalarchitect.com/encode.aspx&lt;/a&gt;. Please let me know what you think.&lt;/p&gt;</description></item><item><title>validating user input and PortalSecurity.InputFilter?</title><link>http://forums.asp.net/thread/1157038.aspx</link><pubDate>Mon, 02 Jan 2006 19:56:12 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1157038</guid><dc:creator>EmperorWal</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1157038.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=97&amp;PostID=1157038</wfw:commentRss><description>&lt;p&gt;Ok, I've read &lt;a HREF="/1/388929/ShowPost.aspx#388929"&gt;http://forums.asp.net/1/388929/ShowPost.aspx#388929&lt;/a&gt;&amp;nbsp;and looked over PortalSecurity's InputFilter method.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p&gt;What I don't understand is I don't see this method used very often in the DNN source. As a matter of fact, I don't think many modules use this method. I see the InputFilter method called by places where the public can enter data (like signin and user registration), but not used to validate every user input.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p&gt;Do most DNN modules assume that users with Edit permission are trusted? That may be a dangerously naïve assumption.&lt;/p&gt;
&lt;p&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/p&gt;
&lt;p&gt;I checked the Forum Module since that is a module that expects input from many users (who may not all be trusted). Forum Module calls InputFilter for the body of the message, but not the Subject. So a subject like&lt;/p&gt;
&lt;p&gt;&amp;lt;SCRIPT&amp;gt;alert('hello');&amp;lt;/SCRIPT&amp;gt;&lt;/p&gt;
&lt;p&gt;can be entered with disturbing results.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>