adding security misconfig text
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
</div>
|
||||
<div class="accordion-body in collapse" id="collapseOne" style="height: auto;">
|
||||
<div class="accordion-inner">
|
||||
Under progress...
|
||||
Security misconfiguration can happen at any level of an application stack, including the platform, web server, application server, database, framework, and custom code. Developers and system administrators need to work together to ensure that the entire stack is configured properly. Automated scanners are useful for detecting missing patches, misconfigurations, use of default accounts, unnecessary services, etc.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -30,7 +30,15 @@
|
||||
</div>
|
||||
<div class="accordion-body collapse" id="collapseTwo" style="height: 0px;">
|
||||
<div class="accordion-inner">
|
||||
Under progress...
|
||||
<p>Rails has quite a few security related configurations. One of which relates to enforcing mass assignment protection.<p>
|
||||
<p>
|
||||
<pre class="ruby">
|
||||
<%= %q{
|
||||
config.active_record.whitelist_attributes=false
|
||||
} %>
|
||||
</pre>
|
||||
</p>
|
||||
<p>This configuration forces an application developer to whitelist attributes that can be modified with mass-assignment. When this configuration is set to false <b>any attribute can be mass-assigned.</b></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -44,7 +52,14 @@
|
||||
</div>
|
||||
<div class="accordion-body collapse" id="collapseThree" style="height: 0px;">
|
||||
<div class="accordion-inner">
|
||||
Under progress...
|
||||
The solution for this issue is quite simple. In your application.rb file set the configuration as follows.
|
||||
<pre class="ruby">
|
||||
<%= %q{
|
||||
config.active_record.whitelist_attributes=true
|
||||
} %>
|
||||
</pre>
|
||||
Once this configuration is updated to true and the application is restarted, any attributes to be mass-assigned will have to be defined as attr_accessible.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -58,7 +73,7 @@
|
||||
</div>
|
||||
<div class="accordion-body collapse" id="collapseFour" style="height: 0px;">
|
||||
<div class="accordion-inner">
|
||||
Under progress...
|
||||
It has to do with mass-assignment, whitelisting and configuration.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user