<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>Poetry of Programming</title>
	<link>http://kiran.gnufied.org</link>
	<description>Its mainly about Ruby on Rails !</description>
	<pubDate>Fri, 26 Feb 2010 12:45:45 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
	<language>en</language>
			<item>
		<title>How Secured is your Rails App?</title>
		<link>http://kiran.gnufied.org/2010/02/26/how-secured-is-your-rails-app/</link>
		<comments>http://kiran.gnufied.org/2010/02/26/how-secured-is-your-rails-app/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 12:43:27 +0000</pubDate>
		<dc:creator>kiran</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://kiran.gnufied.org/2010/02/26/how-secured-is-your-rails-app/</guid>
		<description><![CDATA[What do you prefer in terms of Authentication?
Plugin - Restful Authentication (recommended) - easy to use and you can tweak it according to your requirements.
 http://railscasts.com/episodes/67 http://svn.techno-weenie.net/projects/plugins/restful_authentication/
Build your own authentication. You should rarely need to do this &#8230; Restful Authentication is quite flexible.
 http://www.aidanf.net/rails_user_authentication_tutorial
OpenID - a universal authentication system to avoid use of multiple username [...]]]></description>
			<content:encoded><![CDATA[<p><font color="#ff6600"><strong>What do you prefer in terms of Authentication?</strong></font></p>
<p>Plugin - <strong>Restful Authentication</strong> (recommended) - easy to use and you can tweak it according to your requirements.</p>
<p class="linkbox"> <a href="http://railscasts.com/episodes/67" target="_blank">http://railscasts.com/episodes/67</a> <a href="http://svn.techno-weenie.net/projects/plugins/restful_authentication/" target="_blank">http://svn.techno-weenie.net/projects/plugins/restful_authentication/</a></p>
<p><strong>Build your own authentication</strong>. You should rarely need to do this &#8230; Restful Authentication is quite flexible.</p>
<p class="linkbox"> <a href="http://www.aidanf.net/rails_user_authentication_tutorial" target="_blank">http://www.aidanf.net/rails_user_authentication_tutorial</a></p>
<p><strong>OpenID</strong> - a universal authentication system to avoid use of multiple username and password on the Internet. OpenID is getting quite famous now-a-days.</p>
<p class="linkbox"> <a href="http://media.railscasts.com/videos/068_openid_authentication.mov" target="_blank">http://media.railscasts.com/videos/068_openid_authentication.mov</a> <a href="http://agilewebdevelopment.com/plugins/openidauthentication" target="_blank">http://agilewebdevelopment.com/plugins/openidauthentication</a></p>
<p><strong>Access Control</strong> : To easily proivde different priviliges to your users. There are a lot of cool plugins available for access control.</p>
<p class="linkbox"> <a href="https://opensvn.csie.org/traccgi/tobionrails" target="_blank">https://opensvn.csie.org/traccgi/tobionrails</a><br />
<a href="http://code.google.com/p/rolerequirement/" target="_blank">http://code.google.com/p/rolerequirement/</a><br />
<a href="http://agilewebdevelopment.com/plugins/activeacl_rails_authorization_system" target="_blank">http://agilewebdevelopment.com/plugins/activeacl_rails_authorization_system</a></p>
<p><strong>Centralized Authentication Server</strong> - is used to implement single login/password for your users across multiple application. It can also be used for a single sign-on system. For example, Gmail and Google Reader have a single sign-on between them.
</p>
<p class="linkbox"> <a href="http://agilewebdevelopment.com/plugins/cas_authentication_filter" target="_blank">http://agilewebdevelopment.com/plugins/cas_authentication_filter</a></p>
<p>Use <strong>Google Authentication API</strong> to let your users login using their google username and password.</p>
<p class="linkbox"> <a href="http://rubyforge.org/projects/asgoogleaccount/" target="_blank">http://rubyforge.org/projects/asgoogleaccount/</a></p>
<p><strong>More Plugins</strong> :</p>
<p class="linkbox"> Rails inbuilt Authentication -  <a href="http://ryandaigle.com/articles/2006/12/4/whats-new-in-edge-rails-new-http-authentication-plugin-and-a-plea-to-contribute" target="_blank">http://ryandaigle.com/articles/2006/12/4/whats-new-in&#8230;</a><br />
Acts_as_authenticated - <a href="http://technoweenie.stikipad.com/plugins/show/User+Authentication" target="_blank">http://technoweenie.stikipad.com/plugins/show/User+Authentication</a><br />
Super Simple Authentication - <a href="http://ariejan.net/2007/08/24/super-simple-authentication-plugin-and-generator/" target="_blank">http://ariejan.net/2007/08/24/super-simple-&#8230;</a>
</p>
<p class="linkbox"> <strong><font color="#ff6600">How secured is your Model?</font></strong></p>
<p class="linkbox"> <em><font color="#ff6600"><strong>SQL Injection</strong></font></em></p>
<p class="linkbox">The problem arises when metacharacters are injected into your queries to database. Rails has a very good support to avoid SQL injection if you follow conventions in issuing queries to your database.</p>
<p><strong>Description</strong> :</p>
<p class="linkbox"> <a href="http://manuals.rubyonrails.com/read/chapter/43" target="_blank">http://manuals.rubyonrails.com/read/chapter/43</a></p>
<p><strong>Alternate Solution</strong> - use hash for specifying conditions in <code class="inline">#find</code></p>
<p class="linkbox"> <a href="http://weblog.rubyonrails.org/2006/11/26/1-2-new-in-activerecord" target="_blank">http://weblog.rubyonrails.org/2006/11/26/1-2-new-in-activerecord</a></p>
<p class="linkbox"> <em><font color="#ff6600"><strong>Activerecord Validation </strong></font></em></p>
<p>To validate the contents of model object before records are created/modified in the database. Activerecord validations are very useful over database data-type constraints to ensure values entered into the database follow your rules. You might have javascript validations for forms but javascript can easily be switched off. Use javascript validations only for better user experience.</p>
<p><strong>Description</strong> :</p>
<p class="linkbox"> <a href="http://rails.rubyonrails.com/classes/ActiveRecord/Validations/ClassMethods.html" target="_blank">http://rails.rubyonrails.com/classes/ActiveRecord/Validations/ClassMethods.html</a></p>
<p> <strong>Conditional validation</strong> using <code class="inline">:on</code> and <code class="inline">:if</code> options. Checkout this cool video</p>
<p class="linkbox"> <a href="http://media.railscasts.com/videos/041_conditional_validations.mov" target="_blank">http://media.railscasts.com/videos/041_conditional_validations.mov</a></p>
<p>Be careful using <strong>validates_uniqueness_of</strong>, it has problems when used with <code class="inline">:scope</code> option. Open bug tickets :</p>
<p class="linkbox"> <a href="http://dev.rubyonrails.org/ticket/5608" target="_blank">http://dev.rubyonrails.org/ticket/5608</a><br />
<a href="http://dev.rubyonrails.org/ticket/9235" target="_blank">http://dev.rubyonrails.org/ticket/9235</a><br />
<a href="http://dev.rubyonrails.org/ticket/8811" target="_blank">http://dev.rubyonrails.org/ticket/8811</a><br />
<a href="http://dev.rubyonrails.org/ticket/8774" target="_blank">http://dev.rubyonrails.org/ticket/8774</a></p>
<p>Use <strong>:allow_blank</strong> to pass validations if value is nil or empty string
</p>
<p class="linkbox"> <a href="http://ryandaigle.com/articles/2007/9/5/what-s-new-in-edge-rails-validations-now-allow_blank" target="_blank">http://ryandaigle.com/articles/2007/9/5/what-s-new-in-edge-rails-validations-now-allow_blank</a></p>
<p><strong>Testing Validations</strong> - do read the comments in this article</p>
<p class="linkbox"> <a href="http://blog.jayfields.com/2006/12/rails-unit-testing-activerecord.html" target="_blank">http://blog.jayfields.com/2006/12/rails-unit-testing-activerecord.html </a></p>
<p><strong>Useful Tips</strong></p>
<ul>
<li>Its easy to manage &#8216;nil&#8217; values using <code class="inline">:allow_nil</code>, its quite handy. For ex: set <code class="inline">:allow_nil =&gt; true</code> in validates_uniqueness_of to check uniqueness of non-nil values and ignore nil values</li>
<li> validates_presence_of is not required if you are using validates_format_of, unless regular expression accepts empty string.</li>
</ul>
<p><em><a title="crdfp" name="crdfp"></a><font color="#ff6600"><strong>Creating records directly from parameters</strong></font></em>While creating database records directly from form params, a malicious user can add extra fields into the params and manually submit the web page which will set values of fields which you do not want user to set.</p>
<p><strong>Description</strong> :</p>
<p class="linkbox"> <a href="http://manuals.rubyonrails.com/read/chapter/47" target="_blank">http://manuals.rubyonrails.com/read/chapter/47</a></p>
<p><strong>Alternate Solution</strong> - Trim the parameters to keep the required keys and remove the others.</p>
<p class="linkbox"> <a href="http://wiki.rubyonrails.org/rails/pages/HowToPreventFormInjection" target="_blank">http://wiki.rubyonrails.org/rails/pages/HowToPreventFormInjection</a></p>
<p class="linkbox"> <font color="#ff6600"><strong>How secured is your Controller?</strong></font></p>
<p class="linkbox"> <em><font color="#ff6600"><strong>Exposing methods</strong></font></em></p>
<p class="linkbox">Use private and protected in controller for methods which should not be actions. Actions are pubic methods and can be invoked from the browser.</p>
<p><strong>hide_action</strong> : If non-action controller methods must be public, hide them using hide_action.</p>
<p class="linkbox"> <a href="http://www.mathewabonyi.com/articles/2006/08/11/hide_action-a-hidden-treasure" target="_blank">http://www.mathewabonyi.com/articles/2006/08/11/hide_action-a-hidden-treasure</a></p>
<p>Be careful of bypassing private and protected using <strong>meta-programming</strong></p>
<p class="linkbox"> <a href="http://dev.zeraweb.com/design-blog-14" target="_blank">http://dev.zeraweb.com/design-blog-14</a></p>
<p class="linkbox"> <em><font color="#ff6600"><strong>Authorize parameters </strong></font></em></p>
<p>Always authorize user request. By tweaking form parameters or url a user can send request to view/modify other users information if there is no proper authorization of parameters.</p>
<p>For example :</p>
<table class="CodeRay">
<tr>
<td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }">
<pre>1<tt>
</tt>2<tt>
</tt>3<tt>
</tt>4<tt>
</tt><strong>5</strong><tt>
</tt>6<tt>
</tt>7<tt>
</tt>8<tt>
</tt></pre>
</td>
<td class="code">
<pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }"><tt>
</tt><span class="c">## To find information of an order which belongs to a particular user.</span><tt>
</tt><tt>
</tt><span class="c">#Incorrect :</span><tt>
</tt><span class="iv">@order</span> = <span class="co">Order</span>.find(order_id)<tt>
</tt><tt>
</tt><span class="c">#Correct :</span><tt>
</tt><span class="iv">@order</span> = <span class="iv">@user</span>.orders.find(order_id)<tt>
</tt></pre>
</td>
</tr>
</table>
<p>Do not ignore <strong>hidden fields</strong> - a user can easily modify their value, so suspect them similar to params[:id]</p>
<p class="linkbox"> <a href="http://searchsecurity.techtarget.com/tip/1,289483,sid14_gci1153816,00.html" target="_blank">http://searchsecurity.techtarget.com/tip/1,289483,sid14_gci1153816,00.html</a></p>
<p class="linkbox"><em><font color="#ff6600"><strong>Filter sensitive logs </strong></font></em></p>
<p>Prevent logs of sensitive unencrypted data using <code class="inline">#filter_parameter_logging</code> in controller. The default behavior is to log request parameters in production as well as development environment, and you would not like logging of password, credit card number, etc.</p>
<p><strong>Video Tutorial</strong></p>
<p class="linkbox"> <a href="http://railscasts.com/episodes/9" target="_blank">http://railscasts.com/episodes/9</a></p>
<p class="linkbox"> <font color="#ff6600"><strong><a title="csrf" name="csrf"></a> <em>Cross Site Reference(or Request) Forgery (CSRF) </em></strong></font></p>
<p>In a CSRF attack, the attacker makes victim click on a link of his choice which would contain a GET/POST request and causes web application to take malicious action. The link could be embedded in a iframe or an img tag. Its recommended to use secret token while communicating with user to avoid this attack.</p>
<p>Its little complex to understand this attack. So, only those readers who are very enthusiastic to know about it, please read the <strong>Description</strong> below. Rest can directly move ahead to use the plugin.</p>
<p><strong>Description</strong> :</p>
<p class="linkbox"> <a href="http://isc.sans.org/diary.html?storyid=1750" target="_blank">http://isc.sans.org/diary.html?storyid=1750</a> <a href="http://en.wikipedia.org/wiki/Cross-site_request_forgery" target="_blank">http://en.wikipedia.org/wiki/Cross-site_request_forgery</a></p>
<p>Use <strong>Get and Post</strong> appropiately (note : Both get and post are vulnerable to CSRF)</p>
<p class="linkbox"> <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.1.1" target="_blank">http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.1.1</a></p>
<p><strong>Example</strong> - Gmail CSRF security flaw</p>
<p class="linkbox"> <a href="http://ajaxian.com/archives/gmail-csrf-security-flaw" target="_blank">http://ajaxian.com/archives/gmail-csrf-security-flaw</a></p>
<p>Plugin - <strong>CSRF Killer</strong> (recommended) - it requires edge rails</p>
<p class="linkbox"> <a href="http://svn.techno-weenie.net/projects/plugins/csrf_killer/" target="_blank">http://svn.techno-weenie.net/projects/plugins/csrf_killer/</a><br />
<a href="http://activereload.net/2007/3/6/your-requests-are-safe-with-us" target="_blank">http://activereload.net/2007/3/6/your-requests-are-safe-with-us</a></p>
<p class="linkbox"> Secure action - <a href="http://code.google.com/p/secure-action-plugin/" target="_blank">http://code.google.com/p/secure-action-plugin/</a><br />
Security extension - <a href="http://svn.aviditybytes.com/rails/plugins/security_extensions/" target="_blank">http://svn.aviditybytes.com/rails/plugins/security_extensions/</a>
</p>
<p class="linkbox"> <em><font color="#ff6600"><strong>Minimize session attacks </strong></font></em></p>
<p>If an attacker has session-id of your user, he can create HTTP requests to access user account. An attacker can get session-id by direct access to user machine or is able to successfully run malicious scripts at user machine. In this section we will talk about how to avoid or minimize the risk if attacker has user session-id. Following steps are helpful:</p>
<ol>
<li>Store IP Address, but creates problem if user moves from one network to another.</li>
<li>Create a new session everytime someone logs in.</li>
<li>Expire session on user logout, user is idle for a time period or on closing of browser/tab. For maximum security expire sessions on all the three conditions.</li>
</ol>
<p><strong>Code for session expiry on timeout</strong></p>
<table class="CodeRay">
<tr>
<td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }">
<pre>1<tt>
</tt>2<tt>
</tt>3<tt>
</tt>4<tt>
</tt><strong>5</strong><tt>
</tt>6<tt>
</tt>7<tt>
</tt>8<tt>
</tt>9<tt>
</tt><strong>10</strong><tt>
</tt>11<tt>
</tt>12<tt>
</tt></pre>
</td>
<td class="code">
<pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }"><tt>
</tt><span class="c">## Timeout after inactivity of one hour.</span><tt>
</tt><span class="co">MAX_SESSION_PERIOD</span> = <span class="i">3600</span><tt>
</tt><tt>
</tt>before_filter <span class="sy">:session_expiry</span><tt>
</tt><tt>
</tt><span class="r">def</span> <span class="fu">session_expiry</span><tt>
</tt>   reset_session <span class="r">if</span> session[<span class="sy">:expiry_time</span>] <span class="r">and</span> session[<span class="sy">:expiry_time</span>] &lt; <span class="co">Time</span>.now<tt>
</tt><tt>
</tt>   session[<span class="sy">:expiry_time</span>] = <span class="co">MAX_SESSION_PERIOD</span>.seconds.from_now<tt>
</tt>   <span class="r">return</span> <span class="pc">true</span><tt>
</tt><span class="r">end</span><tt>
</tt></pre>
</td>
</tr>
</table>
<p>Plugin - <strong>Session Expiration</strong> for session expiry on timeout</p>
<p class="linkbox"> <a href="http://www.naffis.com/2007/5/22/automatically-expiring-sessions-in-rails" target="_blank">http://www.naffis.com/2007/5/22/automatically-expiring-sessions-in-rails</a></p>
<p>Do not put expiry time in the cookie unless your cookie information is properly encrypted. If not, use server side session expiry.</p>
<p class="linkbox"> <a href="http://wiki.rubyonrails.org/rails/pages/HowtoChangeSessionOptions" target="_blank">http://wiki.rubyonrails.org/rails/pages/HowtoChangeSessionOptions</a></p>
<p>Persistent session / login in rails - global setting in enviornment.rb</p>
<table class="CodeRay">
<tr>
<td class="line_numbers" title="click to toggle" onclick="with (this.firstChild.style) { display = (display == '') ? 'none' : '' }">
<pre>1<tt>
</tt>2<tt>
</tt></pre>
</td>
<td class="code">
<pre ondblclick="with (this.style) { overflow = (overflow == 'auto' || overflow == '') ? 'visible' : 'auto' }"><tt>
</tt><span class="co">ActionController</span>::<span class="co">Base</span>.session_options[<span class="sy">:session_expires</span>] = &lt;i&gt;say after two years&lt;<span class="rx"><span class="dl">/</span><span class="k">i&gt;<tt>
</tt></span></span></pre>
</td>
</tr>
</table>
<p>Persistent session / login in rails - to give your users a feature - <strong>remember me</strong></p>
<p class="linkbox"> <a href="http://blog.codahale.com/2006/04/08/dynamic-session-expiration-times-with-rails/" target="_blank">http://blog.codahale.com/2006/04/08/dynamic-session-expiration-times-with-rails/</a> <a href="http://www.onrails.org/articles/2006/02/18/auto-login" target="_blank">http://www.onrails.org/articles/2006/02/18/auto-login</a> <a href="http://livsey.org/2006/6/30/persistent-logins-in-rails" target="_blank">http://livsey.org/2006/6/30/persistent-logins-in-rails</a></p>
<p class="linkbox"> <em><font color="#ff6600"><strong>Stop spam on your website from DNS Blacklist </strong></font></em></p>
<p>Avoid access to your website from IP addresses which are present in DNS Blacklist(DNSBL).</p>
<p>Plugin - <strong>DNSBL check</strong></p>
<p class="linkbox"> <a href="http://spacebabies.nl/dnsbl_check/" target="_blank">http://spacebabies.nl/dnsbl_check/</a></p>
<p class="linkbox"> <em><font color="#ff6600"><strong>Caching authenticated pages </strong></font></em></p>
<p>Page caching does bypass any security filters in your application. So avoid caching authenticated pages and use action or fragment caching instead.</p>
<p><font color="#ff6600"><strong>How secured is your view?</strong></font></p>
<p><font color="#ff6600"><em><strong>Cross site scripting(XSS) attack</strong></em></font></p>
<p>Cross Site Scripting is a technique found in web applications which allow code injection by malicious web users into the web pages viewed by other users. An attacker can steal login of your user by stealing his cookie. The most common method of attack is to place javascript code on a website that can receive the session cookie. To avoid the attack, escape HTML meta characters which will avoid execution of malicious Javascript code. Ruby on Rails has inbuilt methods like escape_html() (h()), url_encode(), sanatize(), etc to escape HTML meta characters.</p>
<p><strong>Description</strong></p>
<p class="linkbox"> <a href="http://manuals.rubyonrails.com/read/chapter/44" target="_blank">http://manuals.rubyonrails.com/read/chapter/44</a></p>
<p><strong>Can we avoid tedious use of h() in views?</strong></p>
<p class="linkbox"> <a href="http://wiki.rubyonrails.org/rails/pages/HowToEscapeHTML" target="_blank">http://wiki.rubyonrails.org/rails/pages/HowToEscapeHTML</a></p>
<p><strong>Sanitize()</strong> is used to escape script tags and other malicious content other than html tags. Avoid using it &#8230; its unsecure. Use white_list instead.</p>
<p class="linkbox"> <a href="http://www.rorsecurity.info/2007/08/17/dont-use-strip_tags-strip_links-and-sanitize/" target="_blank">http://www.rorsecurity.info/2007/08/17/dont-use-strip_tags-strip_links-and-sanitize/</a></p>
<p><strong>White_list</strong> plugin</p>
<p class="linkbox"> <a href="http://svn.techno-weenie.net/projects/plugins/white_list/README" target="_blank">http://svn.techno-weenie.net/projects/plugins/white_list/README</a></p>
<p class="linkbox"> <font color="#ff6600"><em><strong>Anti-spam form protection  </strong></em></font></p>
<p>Use <a href="http://en.wikipedia.org/wiki/Captcha">Captcha</a> or Javascript based form protection techniques to ensure only human can submit forms successfully.</p>
<p>When using Captcha do ensure the following :</p>
<ol>
<li>Images are rendered on webpage using <code class="inline">send_data</code> and are not stored at the server, because its not required to store images and are redundant.</li>
<li>Avoid using algorithm used by standard Catpcha plugins as they can easily be hacked, instead tweak an existing algorithm or write your own.</li>
<li>Use a Captcha which does not store secret code or images in filesystem, as you will have trouble using Captcha with multiple servers.</li>
</ol>
<p><strong>Tutorial</strong> - a nice article on concepts of captcha</p>
<p class="linkbox"> <a href="http://revolutiononrails.blogspot.com/2007/04/pedo-mellon-minno-or-captcha-on-rails.html" target="_blank">http://revolutiononrails.blogspot.com/2007/04/pedo-mellon-minno-or-captcha-on-rails.html</a></p>
<p>Plugin - <strong>ReCaptcha</strong> (recommended)</p>
<p class="linkbox"> <a href="http://recaptcha.net/" target="_blank">http://recaptcha.net/</a><br />
<a href="http://ambethia.com/recaptcha/" target="_blank">http://ambethia.com/recaptcha/</a></p>
<p>Plugin - BrainBuster - a <strong>logic captcha</strong> based on simple puzzles, math and word problems. By default, it has limited set of problems and you would have to come up with large set of your own problems.
</p>
<p class="linkbox"> <a href="http://robsanheim.com/brain-buster" target="_blank">http://robsanheim.com/brain-buster</a></p>
<p>Plugin - <strong>Simple Captcha</strong> (not recommended) as it breaks all the must have features of a good Captcha implementation.</p>
<p class="linkbox"> <a href="http://expressica.com/2007/03/23/simple_captcha_1_0/" target="_blank">http://expressica.com/2007/03/23/simple_captcha_1_0/</a></p>
<p>For less critical systems like blogs, a more <strong>user-friendly option</strong> can be use of CSS based technique or JavaScript based plugin unlike Captcha. Both JavaScript and CSS based techniques can only avoid spam from dumb or general bots. If an hacker specifically targets your site or bot is smart enough, you are dead, so be careful.</p>
<p class="linkbox"> CSS based Negative Captcha - <a href="http://damienkatz.net/2007/01/negative_captch.html" target="_blank">http://damienkatz.net/2007/01/negative_captch.html</a><br />
Inverse Captcha for Mephisto - <a href="http://www.artweb-design.de/projects/mephisto-plugin-inverse-captcha-for-comments-anti-spam" target="_blank">http://www.artweb-design.de/projects/mephisto-plugin-inverse&#8230;</a><br />
JavaScript based Form Spam Protection - <a href="http://form-spam-protection.googlecode.com/svn/form_spam_protection/" target="_blank">http://form-spam-protection.googlecode.com/svn/form&#8230;</a></p>
<p><strong>Captcha with Multiple Servers</strong>
</p>
<p class="linkbox"> <a href="http://upstream-berlin.com/blog/2007/08/17/captchas-with-rails-and-multiple-servers/" target="_blank">http://upstream-berlin.com/blog/2007/08/17/captchas-with-rails-and-multiple-servers/</a></p>
<p class="linkbox"> <font color="#ff6600"><em><strong>Hide mailto links </strong></em></font></p>
<p>Mailto links in a webpage can be attacked by e-mail harvesting bots. Use the plugin CipherMail to generate a 1024 bit random key and obfuscate the mailto link.</p>
<p>Plugin - <strong>CipherMail</strong></p>
<p class="linkbox"> <a href="http://agilewebdevelopment.com/plugins/ciphermail" target="_blank">http://agilewebdevelopment.com/plugins/ciphermail</a></p>
<p class="linkbox"> <font color="#ff6600"><em><strong>Use password strength evaluators </strong></em></font></p>
<p>A lot of people have used password strength evaluators simply because its used by google in their registration form. You can use it to help your users register with strong password. But I don&#8217;t think its a must have security addon. Uptill now I have not found a good algorithm to assess strength of a password, but some of them are reasonable.</p>
<p>Also, if there is an open source tool or algorithm for evaluating password strength, it can easily be broken. So, you might consider tweaking the algorithm or building one from scratch.</p>
<p><strong>Tools</strong></p>
<p class="linkbox"> <a href="http://www.certainkey.com/demos/password/" target="_blank">http://www.certainkey.com/demos/password/</a> <a href="http://www.jeffro2pt0.com/ajax-powered-password-strength-meter/" target="_blank">http://www.jeffro2pt0.com/ajax-powered-password-strength-meter/</a> <a href="http://www.geekwisdom.com/dyn/passwdmeter" target="_blank">http://www.geekwisdom.com/dyn/passwdmeter</a> <a href="http://www.jvoorhis.com/articles/2006/04/06/automatic-password-suggestion-for-your-rails-app" target="_blank">http://www.jvoorhis.com/articles/2006/04/06/automatic-password-suggestion-for-your-rails-app</a></p>
<p class="linkbox"> <font color="#ff6600"><strong>Whats more to check for security?</strong></font></p>
<p class="linkbox"><font color="#ff6600"><em><strong>Transmission of Sensitive information</strong></em></font></p>
<p class="linkbox">Use SSL to encrypt sensitive data between transfer from client to server. SSL hits server performace, so you might consider using SSL only for few pages which transfer sensitive data to and fro.</p>
<p>Plugin <strong>ssl_requirement</strong></p>
<p class="linkbox"> <a href="http://svn.rubyonrails.org/rails/plugins/ssl_requirement/README" target="_blank">http://svn.rubyonrails.org/rails/plugins/ssl_requirement/README</a></p>
<p><strong>Mongrel, rails, apache and SSL</strong></p>
<p class="linkbox"> <a href="http://blog.innerewut.de/2006/06/21/mongrel-and-rails-behind-apache-2-2-and-ssl" target="_blank">http://blog.innerewut.de/2006/06/21/mongrel-and-rails-behind-apache-2-2-and-ssl</a></p>
<p>Controller in <strong>SSL subdomain</strong></p>
<p class="linkbox">  <a href="http://www.railsonwave.com/railsonwave/2007/7/10/howto-put-a-controller-under-a-ssl-subdomain" target="_blank">http://www.railsonwave.com/railsonwave/2007/7/10/howto-put-a-controller-under-a-ssl-subdomain</a></p>
<p><strong>Sample SSL code in rails</strong></p>
<p class="linkbox"> <a href="http://blog.caboo.se/articles/2007/4/21/sample-rails-app-branch-with-ssl" target="_blank">http://blog.caboo.se/articles/2007/4/21/sample-rails-app-branch-with-ssl</a></p>
<p class="linkbox"> <font color="#ff6600"><em><strong>File upload </strong></em></font></p>
<p>Be very careful when you allow your users to upload files and make them available for other users to download.</p>
<p><strong>Description</strong></p>
<p class="linkbox"> <a href="http://www.rorsecurity.info/2007/03/27/working-with-files-in-rails/" target="_blank">http://www.rorsecurity.info/2007/03/27/working-with-files-in-rails/</a></p>
<p><strong>Must read</strong> - Section 26.7 of Agile web development with rails - 2nd edition</p>
<p class="linkbox"> <a href="http://www.pragmaticprogrammer.com/titles/rails2/" target="_blank">http://www.pragmaticprogrammer.com/titles/rails2/</a></p>
<p><strong>In place file upload</strong></p>
<p class="linkbox"> <a href="http://kpumuk.info/ruby-on-rails/in-place-file-upload-with-ruby-on-rails/" target="_blank">http://kpumuk.info/ruby-on-rails/in-place-file-upload-with-ruby-on-rails/</a></p>
<p>3 plugins for file upload reviewed at :</p>
<p class="linkbox"> <a href="http://www.flex888.com/2007/03/21/three-ruby-on-rails-file-upload-plugins-reviewed.html" target="_blank">http://www.flex888.com/2007/03/21/three-ruby-on-rails-file-upload-plugins-reviewed.html</a></p>
<p class="linkbox"> <font color="#ff6600"><em><strong>Secure your setup / environment </strong></em></font></p>
<p class="linkbox"> <a href="http://www.igvita.com/blog/2006/10/10/securing-your-rails-environment/" target="_blank">http://www.igvita.com/blog/2006/10/10/securing-your-rails-environment/</a></p>
<p class="linkbox"> <font color="#ff6600"><em><strong>Proper Mysql configuration </strong></em></font></p>
<p class="linkbox"> <a href="http://www.rorsecurity.info/2007/02/25/securing-mysql/" target="_blank">http://www.rorsecurity.info/2007/02/25/securing-mysql/</a> <a href="http://www.rorsecurity.info/2007/02/27/rails%e2%80%99-friends-securing-mysql-continued/" target="_blank">http://www.rorsecurity.info/2007/02/27/rails%e2%80%99-friends-securing-mysql-continued/</a></p>
<p class="linkbox"> <font color="#ff6600"><em><strong>Use good passwords </strong></em></font></p>
<p class="linkbox"> <a href="http://en.wikipedia.org/wiki/Password_strength" target="_blank">http://en.wikipedia.org/wiki/Password_strength</a> <a href="http://www.rorsecurity.info/2007/06/05/use-good-passwords/" target="_blank">http://www.rorsecurity.info/2007/06/05/use-good-passwords/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://kiran.gnufied.org/2010/02/26/how-secured-is-your-rails-app/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Ubuntu 9.10 running in low-graphics mode</title>
		<link>http://kiran.gnufied.org/2009/12/10/ubuntu-910-running-in-low-graphics-mode/</link>
		<comments>http://kiran.gnufied.org/2009/12/10/ubuntu-910-running-in-low-graphics-mode/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 14:15:27 +0000</pubDate>
		<dc:creator>kiran</dc:creator>
		
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://kiran.gnufied.org/2009/12/10/ubuntu-910-running-in-low-graphics-mode/</guid>
		<description><![CDATA[After the installation from update manager, and every time I boot up my machine, I get a error with three options out of which I am forced to click OK for &#8220;Run Ubuntu in low-graphics mode for just one session&#8221; option.
Resolution upon reference from url (http://ubuntuforums.org/archive/index.php/t-1242813.html) for Ubuntu 9.10:
Take a backup and edit xorg.conf file:
sudo [...]]]></description>
			<content:encoded><![CDATA[<p>After the installation from update manager, and every time I boot up my machine, I get a error with three options out of which I am forced to click OK for &#8220;Run Ubuntu in low-graphics mode for just one session&#8221; option.</p>
<p>Resolution upon reference from url (http://ubuntuforums.org/archive/index.php/t-1242813.html) for Ubuntu 9.10:</p>
<p>Take a backup and edit xorg.conf file:</p>
<p>sudo cp /etc/X11/xorg.conf /etc/X11/xorg.conf_bkp<br />
sudo gedit /etc/X11/xorg.conf</p>
<p>Delete this Section Device:</p>
<p>Section &#8220;Device&#8221;<br />
Identifier     &#8220;Device0&#8243;<br />
Driver         &#8220;nvidia&#8221;<br />
VendorName     &#8220;NVIDIA Corporation&#8221;<br />
BoardName      &#8220;GeForce 8400M GS&#8221;<br />
EndSection</p>
<p>And Edit the Section Screen as:</p>
<p>Section &#8220;Screen&#8221;<br />
Identifier     &#8220;Screen0&#8243;<br />
Device         &#8220;Device0&#8243;<br />
Monitor        &#8220;Monitor0&#8243;<br />
DefaultDepth    24<br />
SubSection     &#8220;Display&#8221;<br />
Depth       24<br />
Modes &#8220;1440&#215;990&#8243;<br />
EndSubSection<br />
EndSection</p>
<p>Here we go, no more low graphics mode issues.</p>
]]></content:encoded>
			<wfw:commentRss>http://kiran.gnufied.org/2009/12/10/ubuntu-910-running-in-low-graphics-mode/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Windows 7 and ROXIO</title>
		<link>http://kiran.gnufied.org/2009/12/10/windows-7-and-roxio/</link>
		<comments>http://kiran.gnufied.org/2009/12/10/windows-7-and-roxio/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 13:08:10 +0000</pubDate>
		<dc:creator>kiran</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[perfect uninstaller]]></category>

		<category><![CDATA[roxio]]></category>

		<category><![CDATA[Windows7]]></category>

		<guid isPermaLink="false">http://kiran.gnufied.org/2009/12/10/windows-7-and-roxio/</guid>
		<description><![CDATA[I recently got my XPS M1330 notebook upgraded from Windows Vista to Windows 7.It happened that one day I need to burn a CD and found that ROXIO DVD Creator is no more working though I have used it less. I have found the collection of CDs given by Dell and re-installed ROXIO Creator 9.  [...]]]></description>
			<content:encoded><![CDATA[<p>I recently got my XPS M1330 notebook upgraded from Windows Vista to Windows 7.It happened that one day I need to burn a CD and found that ROXIO DVD Creator is no more working though I have used it less. I have found the collection of CDs given by Dell and re-installed ROXIO Creator 9.  Thats it ! I made my own Axe on neck. Everytime I boot up my notebook.  a pop up near the windows toolbar stating &#8220;This driver has got compaitibity issues with windows blah&#8230; blah&#8230;&#8221; and then the following errors appear:<em>Microsoft Visual C++ Runtime Library</em><em>Runtime Error!</em><em>Program:&#8230;ommon Files\RoxioShare\9.0\SharedCom\(application).exe</em><em>The application has requested the Runtime to terminate it in an unusual way.Please contact the applications support team for more information</em><strong> - OR -  </strong><em>Microsoft Visual C++ Runtime Library</em><em>Runtime Error!</em><em>Program: C:\Program Files\Roxio\(application folder)\(application name).exe</em><em>R6025- pure virtual functional call </em>I should say its more than a nightmare. This error keep popping up by freezing my notebook every 10-15 minutes approx. I tried all my ways of uninstalling it by following this support url of ROXIO.http://kb.roxio.com/search.aspx?URL=/content/kb/Creator/000127CR&amp;PARAMS=But No Go !The error continued  for several Days..  Irritated and frustrated, today i just sat for hours to fix it. Finally I did it. Took almost 6 hours to google it and fix it though.I am blogging it to help another &#8220;Sufferer&#8221; of Roxio.Step 1:  I have got ROXIO installed as many Programs infact using the Roxio Creator 9 CD given by Dell.
<ul>
<li>&#8220;Roxio Audio&#8221;</li>
<li>&#8220;Roxio MyDVD&#8221;</li>
<li>&#8220;Roxio Drag and Disc&#8221; etc.. with update manager included.</li>
</ul>
<p>Step 2: Instead of uninstalling the programs through Control Panel remove programs. Uninstall themFrom Program Files -&gt; roxio XXX -&gt; UninstallFollow this support url -&gt;   <em><strong>http://kb.roxio.com/search.aspx?URL=/content/kb/Creator/000127CR&amp;PARAMS= </strong></em>Step 3: I did everything but I couldnt delete Program Files -&gt; Commom Files -&gt; Roxio Shared/Sonic Shared.It says that it is used by some other application. Those are nothing but# RoxWatchTray9.exe# RoxMediaDB9.exe# VideoWave9.exe# MyDVD9.exe# MediaManager9.exe# DiscCopier9.exe# RXLabelCreator.exeStep 4:  I opened Task Manager in Windows 7 , it didn&#8217;t showed me any of these processes running. Here lies the main story. Due to which I couldnt delete the Roxio Shared under common files folder which is the root cause of Runtime error Popping up now and then.I even ran to buy Perfect uninstaller Software by reading this :http://www.squidoo.com/uninstallroxioI used that software and got ROXIO uninstalled though.Later I found &#8220;Show all process from all users&#8221; tab under Task Manager wherein you can end that process of roxioxxx.exe running and easily delete that Roxio shared folder under common files.Great ! those Perfect uninstaller people are earning on Roxio. Kudos to them! Kicks to roxio! and Sorries for other Users (like me)! But dont worry, just try the above steps.</p>
]]></content:encoded>
			<wfw:commentRss>http://kiran.gnufied.org/2009/12/10/windows-7-and-roxio/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Rails 2.3.3 Released</title>
		<link>http://kiran.gnufied.org/2009/07/23/rails-233-released/</link>
		<comments>http://kiran.gnufied.org/2009/07/23/rails-233-released/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 04:18:26 +0000</pubDate>
		<dc:creator>kiran</dc:creator>
		
		<category><![CDATA[Ruby on Rails]]></category>

		<category><![CDATA[Rails]]></category>

		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://kiran.gnufied.org/2009/07/23/rails-233-released/</guid>
		<description><![CDATA[A new release of Rails is available - Rails 2.3.3.Among the usual bug fixes, a few new features were added, from the release notes:


touch is a convenient method to update a record&#8217;s timestamp and nothing else. This is extracted from apps whose models &#8220;touch‚&#8221; others when they change, such as a comment updating the parent.replies_changed_at timestamp [...]]]></description>
			<content:encoded><![CDATA[<p><span class="Apple-style-span" style="font-family: Lucida; line-height: 16px; font-size: 13px">A <a href="http://weblog.rubyonrails.org/2009/7/20/rails-2-3-3-touching-faster-json-bug-fixes" style="text-decoration: underline; color: #0b59b2">new release of Rails is available - Rails 2.3.3</a>.Among the usual bug fixes, a few new features were added, from the release notes:</span><br />
<blockquote style="margin-right: 0px; margin-left: 20px; color: #333333; background-image: url('http://cdn2.infoq.com/styles/i/bg-blockquote.gif'); background-repeat: no-repeat; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: #fafafa; background-position: 5px 5px; border-width: 2px; border-color: #efefef; border-style: solid; padding: 5px">
<ul>
<li>touch is a convenient method to update a record&#8217;s timestamp and nothing else. This is extracted from apps whose models &#8220;touch‚&#8221; others when they change, such as a comment updating the parent.replies_changed_at timestamp after save and destroy.[..]</li>
<li>:primary_key option for belongs_to for broader support of legacy schemas and those using a separate UUID primary key: belongs_to :employee, :primary_key =&gt; &#8216;SSN&#8217;, :foreign_key =&gt; &#8216;EMPID&#8217; [..]</li>
<li>leaner user-facing encoding [JSON] API.</li>
<li>decoding backends for the json and yajl libraries. Both are significantly faster than the default YAML backend.</li>
</ul>
</blockquote>
<p>Meanwhile, the work on Rails 3 continues. Yehuda Katz has posted a few blog entries on the <a href="http://yehudakatz.com/2009/06/11/rails-edge-architecture/" style="text-decoration: underline; color: #0b59b2">new architecture for Rails 3</a>, as well as <a href="http://www.engineyard.com/blog/2009/6-steps-to-refactoring-rails-for-mere-mortals/" style="text-decoration: underline; color: #0b59b2">lessons learned from refactoring a large code base as Rails</a>.One of the goals of Rails 3 is to bring Merb&#8217;s modularity and well defined internal APIs to the Rails codebase; Yehuda&#8217;s <a href="http://yehudakatz.com/2009/07/19/rails-3-the-great-decoupling/" style="text-decoration: underline; color: #0b59b2">article on the interface between <code style="font: normal normal normal 90%/130% 'Courier New', Courier">ActionController</code> and <code style="font: normal normal normal 90%/130% 'Courier New', Courier">ActionView</code></a> gives some insight in what&#8217;s going on on that front. What becomes clear is that the fusion of Merb and Rails is a major project and is still underway.The work on Rails 3 also has an impact on the development of Merb. A <a href="http://groups.google.com/group/merb/browse_thread/thread/3e0fb8f637b8a2fd" style="text-decoration: underline; color: #318528">recent discussion on the Merb mailing list addressed the state of Merb 1.1</a>, which was due a few months ago. The current plan is to make sure a smooth migration path to Rails 3 is possible - which, of course, requires to know what Rails 3 architecture will be.With all that said, Merb is still a viable solution for many projects, as <a href="http://groups.google.com/group/merb/msg/5000c4a8115fdfa7" style="text-decoration: underline; color: #0b59b2">Ezra Zygmuntowicz (Merb&#8217;s creator) points out</a>:<br />
<blockquote style="margin-right: 0px; margin-left: 20px; color: #333333; background-image: url('http://cdn2.infoq.com/styles/i/bg-blockquote.gif'); background-repeat: no-repeat; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; background-color: #fafafa; background-position: 5px 5px; border-width: 2px; border-color: #efefef; border-style: solid; padding: 5px">I&#8217;d like to chime in and say that I am still happily building apps with merb, http://engineyard.com/solo is built on merb. I don&#8217;t find that there is anything I&#8217;m missing or that there are any features or major bugs stopping me from building apps with merb.</p></blockquote>
<p>For another glimpse at plans for Rails 3, <a href="http://railsconf.blip.tv/file/2081411/" style="text-decoration: underline; color: #0b59b2">David Heinemeier Hansson&#8217;s RailsConf&#8217;09 talk is available online</a>.
<p style="display: block; margin-top: 15px">&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://kiran.gnufied.org/2009/07/23/rails-233-released/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Driver Error: Svn Merge</title>
		<link>http://kiran.gnufied.org/2008/12/27/driver-error-svn-merge/</link>
		<comments>http://kiran.gnufied.org/2008/12/27/driver-error-svn-merge/#comments</comments>
		<pubDate>Sat, 27 Dec 2008 09:59:10 +0000</pubDate>
		<dc:creator>kiran</dc:creator>
		
		<category><![CDATA[Ruby on Rails]]></category>

		<category><![CDATA[Technology]]></category>

		<category><![CDATA[Merge]]></category>

		<category><![CDATA[Rails]]></category>

		<category><![CDATA[Svn]]></category>

		<guid isPermaLink="false">http://kiran.gnufied.org/2008/12/27/driver-error-svn-merge/</guid>
		<description><![CDATA[ The &#8217;svn merge&#8217; command compares two trees, generates a patch, then 
applies that patch to a working copy.  Yes, you have complete freedom 
to compare any two trees, and thereby generate any patch you want.  But 
that does *not* mean that &#8217;svn merge&#8217; always will do what you want. 
It&#8217;s *your* responsbility [...]]]></description>
			<content:encoded><![CDATA[<p><em class="quotelev1"> </em><span class="quotelev1">The &#8217;svn merge&#8217; command compares two trees, generates a patch, then </span><br />
<span class="quotelev1">applies that patch to a working copy.  Yes, you have complete freedom </span><br />
<span class="quotelev1">to compare any two trees, and thereby generate any patch you want.  But </span><br />
<span class="quotelev1">that does *not* mean that &#8217;svn merge&#8217; always will do what you want. </span><br />
<span class="quotelev1">It&#8217;s *your* responsbility to make sure that the patch being produced </span><br />
<span class="quotelev1">makes sense, and cleanly applies to your working copy. </span>     <span class="quotelev2"> </span><br />
<span class="quotelev2">Skipped &#8217;src&#8217; </span><br />
<span class="quotelev2">Skipped &#8217;src&#8217; </span><br />
<span class="quotelev2">Skipped &#8217;src\au&#8217; </span><br />
<span class="quotelev2">Skipped &#8217;src\au\com&#8217; </span><br />
<span class="quotelev2">Skipped &#8217;src\au\com\forward&#8217; </span><br />
<span class="quotelev2">Skipped &#8217;src\au\com\forward\codeSections&#8217; </span><br />
<span class="quotelev2">A  src\au\com\forward\codeSections\DesignNotes.txt </span><br />
<span class="quotelev2"> A  src\au\com\forward\codeSections\CodeSections.java </span><br />
<span class="quotelev2">Skipped &#8217;src\au\com\forward\codeSections\testFiles&#8217; </span><br />
<span class="quotelev2">A  src\au\com\forward\codeSections\testFiles\testin.cs </span><br />
<span class="quotelev2">Skipped &#8216;docs&#8217; </span><br />
<span class="quotelev2">Skipped &#8216;docs&#8217; </span><br />
<span class="quotelev2"> A  docs\htmldoc.exe </span></p>
<p><span class="quotelev1"> See those skipped messages?  That indicates driver error.  The merge </span><br />
<span class="quotelev1">command is trying to add and remove certain directories because they&#8217;re </span><br />
<span class="quotelev1">not related to each other at all.  Please read this section of chapter </span><br />
<span class="quotelev1">4, regarding ancestry: </span></p>
<p><span class="quotelev1"><a href="http://svnbook.red-bean.com/en/1.1/ch04s03.html#svn-ch-4-sect-3.2.4">http://svnbook.red-bean.com/en/1.1/ch04s03.html#svn-ch-4-sect-3.2.4</a> </span></p>
<p><span class="quotelev1">Then after reverting, try the merge again with the &#8211;ignore-ancestry </span><br />
<span class="quotelev1">command.</span></p>
<p>So, It is like this what I have implemented,</p>
<p>&gt; Taken a latest production copy as my_working_copy</p>
<p>&gt; Merged the dev branch with production branch under  my_working_copy</p>
<p>svn merge &#8211;ignore-ancestry <strong>prod_branch_url</strong> <strong>dev_branch_url</strong> my_working_copy/</p>
<p>&gt; And this is how we avoid the <em class="quotelev1">driver error.</em></p>
<p>&gt; Check for conflicts under my_working_copy</p>
<p>Fix the conflicts always in favour of Clients Requirements.</p>
<p>Else if no conflicts, check in the merge to production</p>
<p>Finally, Say The END to the project !!!</p>
<p>Next is What ?  [ Samsung Adv <img src='http://kiran.gnufied.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ]</p>
]]></content:encoded>
			<wfw:commentRss>http://kiran.gnufied.org/2008/12/27/driver-error-svn-merge/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Avoid SVN updates for External Rails Plugins in your Application</title>
		<link>http://kiran.gnufied.org/2008/12/06/avoid-svn-updates-for-external-rails-plugins-in-your-application/</link>
		<comments>http://kiran.gnufied.org/2008/12/06/avoid-svn-updates-for-external-rails-plugins-in-your-application/#comments</comments>
		<pubDate>Sat, 06 Dec 2008 15:11:10 +0000</pubDate>
		<dc:creator>kiran</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[plugins]]></category>

		<category><![CDATA[Rails]]></category>

		<category><![CDATA[Svn]]></category>

		<guid isPermaLink="false">http://kiran.gnufied.org/2008/12/06/avoid-svn-updates-for-external-rails-plugins-in-your-application/</guid>
		<description><![CDATA[Make sure you are in the root of your app and do:
svn propedit svn:externals vendor/plugins
Just delete the line(s) of the plugins you no longer want.
If you get the following error then you need to set your environment variable.
svn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR is set, and no &#8216;editor-cmd&#8217; run-time configuration option [...]]]></description>
			<content:encoded><![CDATA[<p>Make sure you are in the root of your app and do:<br />
<strong>svn propedit svn:externals vendor/plugins</strong><br />
Just delete the line(s) of the plugins you no longer want.</p>
<p>If you get the following error then you need to set your environment variable.<br />
<strong>svn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR is set, and no &#8216;editor-cmd&#8217; run-time configuration option was found</strong></p>
<p>For example, you can set the SVN_EDITOR to use Vi editor from your unix prompt like</p>
<p>export SVN_EDITOR=&#8217;&#8221;/bin/vi&#8221;&#8216;</p>
<p>In Windows, instead of export, it is</p>
<p>set <span class="searchword1">SVN_EDITOR</span>=c:/w<span class="searchword2">in</span>dows/notepad.exe (for notepad)</p>
<p>or</p>
<p>set SVN_EDITOR=&#8221;C:\Program Files\Posix Tools\bin\vi&#8221; (for Vi editor)</p>
]]></content:encoded>
			<wfw:commentRss>http://kiran.gnufied.org/2008/12/06/avoid-svn-updates-for-external-rails-plugins-in-your-application/feed/</wfw:commentRss>
		</item>
		<item>
		<title>I need an individual file to be migrated in Rails</title>
		<link>http://kiran.gnufied.org/2008/10/15/i-need-an-individual-file-to-be-migrated-in-rails/</link>
		<comments>http://kiran.gnufied.org/2008/10/15/i-need-an-individual-file-to-be-migrated-in-rails/#comments</comments>
		<pubDate>Wed, 15 Oct 2008 14:38:54 +0000</pubDate>
		<dc:creator>kiran</dc:creator>
		
		<category><![CDATA[Ruby on Rails]]></category>

		<category><![CDATA[Migrations]]></category>

		<category><![CDATA[Rails]]></category>

		<guid isPermaLink="false">http://kiran.gnufied.org/2008/10/15/i-need-an-individual-file-to-be-migrated-in-rails/</guid>
		<description><![CDATA[Rails migrations are great, they allow continual evolution of database schema. Sometimes, especially when prototyping, I hate to run migrations down and up and load data, just to make small independent change in database table. In this situations I run only specific migration:
ruby script/runner 'require "db/migrate/005_create_blogs"; \n
CreateBlogs.migrate(:down)'
ruby script/runner 'require "db/migrate/005_create_blogs";\n
 CreateBlogs.migrate(:up)'

This is much typing (for [...]]]></description>
			<content:encoded><![CDATA[<p>Rails migrations are great, they allow continual evolution of database schema. Sometimes, especially when prototyping, I hate to run migrations down and up and load data, just to make small independent change in database table. In this situations I run only specific migration:</p>
<pre><code>ruby script/runner 'require "db/migrate/005_create_blogs"; \n
CreateBlogs.migrate(:down)'
ruby script/runner 'require "db/migrate/005_create_blogs";\n
 CreateBlogs.migrate(:up)'
</code></pre>
<p>This is much typing (for just one migration at least <img src='http://kiran.gnufied.org/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> so here is the rake task to do the same:</p>
<pre><code>namespace :db do
  task :migrate_one =&gt; :environment do
    file = Dir["db/migrate/#{ENV["VERSION"]}_*.rb"].first
    require(file)
    migration_class = file.scan(
/([0-9]+)_([_a-z0-9]*).rb/)[0][1].camelize.constantize
    migration_class.migrate(:down) unless ENV["DIRECTION"] == 'up'
    migration_class.migrate(:up) unless ENV["DIRECTION"] == 'down'
  end
end
</code></pre>
<p>Put this rake task in <em>lib/tasks</em> and you can call it with <em>rake db:migrate_one <span class="caps">VERSION</span>=005</em>. This would run migration down and up. You can also add <em><span class="caps">DIRECTION</span>=up</em> or <em><span class="caps">DIRECTION</span>=down</em> to control direction.</p>
<p>Thanks to Bojan Mihelac.</p>
]]></content:encoded>
			<wfw:commentRss>http://kiran.gnufied.org/2008/10/15/i-need-an-individual-file-to-be-migrated-in-rails/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Enni Gundelu aaa?</title>
		<link>http://kiran.gnufied.org/2008/08/28/enni-gundelu-aaa/</link>
		<comments>http://kiran.gnufied.org/2008/08/28/enni-gundelu-aaa/#comments</comments>
		<pubDate>Thu, 28 Aug 2008 08:47:42 +0000</pubDate>
		<dc:creator>kiran</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[heart]]></category>

		<category><![CDATA[telugu]]></category>

		<guid isPermaLink="false">http://kiran.gnufied.org/2008/08/28/enni-gundelu-aaa/</guid>
		<description><![CDATA[&#8220;Enni Gundelu aaa?&#8221; Its a normal saying in telugu asking How dare you? But the exact words translation is &#8220;How many hearts you have haan?&#8221; Hmm&#8230; Well&#8230; I have two hearts !!!
]]></description>
			<content:encoded><![CDATA[<p>&#8220;Enni Gundelu aaa?&#8221; Its a normal saying in telugu asking How dare you? But the exact words translation is &#8220;How many hearts you have haan?&#8221; Hmm&#8230; Well&#8230; I have two hearts !!!</p>
]]></content:encoded>
			<wfw:commentRss>http://kiran.gnufied.org/2008/08/28/enni-gundelu-aaa/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Weird, Rare&#8230; and what not !</title>
		<link>http://kiran.gnufied.org/2008/07/28/weird-rare-and-what-not/</link>
		<comments>http://kiran.gnufied.org/2008/07/28/weird-rare-and-what-not/#comments</comments>
		<pubDate>Mon, 28 Jul 2008 09:57:50 +0000</pubDate>
		<dc:creator>kiran</dc:creator>
		
		<category><![CDATA[General]]></category>

		<category><![CDATA[Firefox]]></category>

		<category><![CDATA[Hosts]]></category>

		<category><![CDATA[IE]]></category>

		<category><![CDATA[Mozilla]]></category>

		<category><![CDATA[Proxy]]></category>

		<guid isPermaLink="false">http://kiran.gnufied.org/2008/07/28/weird-rare-and-what-not/</guid>
		<description><![CDATA[Apart from Redhat Linux, I&#8217;m also trying to set up my Rails app on a Win XP Pro machine to clarify some Ajax effects in IE.  IE used system hosts file very well.  But at the same time, on the same OS,  my latest Mozilla Firefox version 3.0.1 ignores the same hosts file. [...]]]></description>
			<content:encoded><![CDATA[<p>Apart from Redhat Linux, I&#8217;m also trying to set up my Rails app on a Win XP Pro machine to clarify some Ajax effects in IE.  IE used system hosts file very well.  But at the same time, on the same OS,  my latest Mozilla Firefox version 3.0.1 ignores the same hosts file. And this only happens when Proxy Server is used.</p>
<p>I didn&#8217;t understand why the configuration works only with IE, but not with<br />
Mozilla.  Makes no sense to me at all.</p>
<p>I am sure that I have set no proxy for localhost, and I have even tried setting no proxy for the local IP range like 192.168.3.0/24 where my working IP lies in between. Glory ! it worked&#8230;!!!</p>
<p>Ofcourse, I googled with suggestions of clearing cache and subscription to 5$ monthly plan to know the solution. So this info.. is for those who uses proxy and gets weird cases like this&#8230; Enjoy the solution,  absolutely free&#8230;! <img src='http://kiran.gnufied.org/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
			<wfw:commentRss>http://kiran.gnufied.org/2008/07/28/weird-rare-and-what-not/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Ubuntu + ROR + Mysql + Svn +VPN</title>
		<link>http://kiran.gnufied.org/2008/06/25/ubuntu-ror-mysql-svn-vpn/</link>
		<comments>http://kiran.gnufied.org/2008/06/25/ubuntu-ror-mysql-svn-vpn/#comments</comments>
		<pubDate>Wed, 25 Jun 2008 14:31:31 +0000</pubDate>
		<dc:creator>kiran</dc:creator>
		
		<category><![CDATA[Ruby on Rails]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<category><![CDATA[Mysql]]></category>

		<category><![CDATA[Svn]]></category>

		<category><![CDATA[VPN]]></category>

		<guid isPermaLink="false">http://kiran.gnufied.org/2008/06/25/ubuntu-ror-mysql-svn-vpn/</guid>
		<description><![CDATA[Every time we install Ruby/Rails/Mysql/Rmagick/Vpn on Ubuntu Gutsy or Hardy we face the same  errors again and again. Lets  reduce the installation time and have a loop-back-fix-free or smooth installation experience.
After you run the CD or install Ubuntu, make sure of your Network Proxies if any, if so, you need to add the proxy [...]]]></description>
			<content:encoded><![CDATA[<p>Every time we install Ruby/Rails/Mysql/Rmagick/Vpn on Ubuntu Gutsy or Hardy we face the same  errors again and again. Lets  reduce the installation time and have a loop-back-fix-free or smooth installation experience.</p>
<p>After you run the CD or install Ubuntu, make sure of your Network Proxies if any, if so, you need to add the proxy url at System-&gt;preferences-&gt;Network Proxy.</p>
<p>then from terminal, make sure this passes&#8230;</p>
<p>sudo apt-get update</p>
<p>then for Mysql/Rails installation follow this:</p>
<p>http://articles.slicehost.com/2007/11/23/ubuntu-gutsy-mysql-and-ror</p>
<p>and for VPN installation/connection on Ubuntu, this is the best guide:</p>
<p>http://www.cs.umn.edu/help/offsite/vpn.php#ubuntu_config</p>
]]></content:encoded>
			<wfw:commentRss>http://kiran.gnufied.org/2008/06/25/ubuntu-ror-mysql-svn-vpn/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
