<?xml version="1.0" encoding="UTF-8"?>
<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/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>LAMP with ·dotmanila &#187; Application Security</title>
	<atom:link href="http://dotmanila.com/blog/category/application-security/feed/" rel="self" type="application/rss+xml" />
	<link>http://dotmanila.com/blog</link>
	<description>Linux, Apache, PHP, MySQL Musings</description>
	<lastBuildDate>Sun, 01 Apr 2012 17:24:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Zend_Validate_StringEquals</title>
		<link>http://dotmanila.com/blog/2010/01/zend_validate_stringequals/</link>
		<comments>http://dotmanila.com/blog/2010/01/zend_validate_stringequals/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 14:54:23 +0000</pubDate>
		<dc:creator>jervin</dc:creator>
				<category><![CDATA[Application Security]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[ZendFramework]]></category>
		<category><![CDATA[Zend_Input_Filter]]></category>
		<category><![CDATA[Zend_Validate]]></category>

		<guid isPermaLink="false">http://dotmanila.com/blog/?p=121</guid>
		<description><![CDATA[If you ever wonder where that &#8216;StringEquals&#8217; validator rule taken as example from the Zend_Filter_Input documentation page results in an error like below, well read again. It was clearly stated as &#8216;hypothetical&#8217;. Plugin by name &#8216;StringEquals&#8217; was not found in the registry; used paths: Zend_Validate_: Zend/Validate/ Given such validator would be useful on a number [...]]]></description>
			<content:encoded><![CDATA[<p>If you ever wonder where that &#8216;StringEquals&#8217; validator rule taken as example from the Zend_Filter_Input documentation page results in an error like below, well read again. It was clearly stated as &#8216;hypothetical&#8217;.</p>
<blockquote>
<h3>Plugin by name &#8216;StringEquals&#8217; was not found in the registry; used paths: Zend_Validate_: Zend/Validate/</h3>
</blockquote>
<p>Given such validator would be useful on a number of situations i.e. confirming passwords, emails, etc. I present to you my own version of the class.</p>
<pre class="brush: php;ruler: true;">
&lt;?php
"%field1% and %field2% are not equal.",
        self::MISSING	=&gt; "One or both strings are missing."
    );

    /**
     * @var array
     */
    protected $_messageVariables = array(
        'field1' =&gt; '_field1',
        'field2' =&gt; '_field2'
    );

    protected $_case = false;
    protected $_field1 = null;
    protected $_field2 = null;

    /**
     * Sets validator options
     *
     * @param  boolean $case
     * @return void
     */
    public function __construct($case = false)
    {
        $this-&gt;_case = $case;
    }

    /**
     * Defined by Zend_Validate_Interface
     *
     * Returns true if and only if the the 2 strings are equal
     *
     * @param  array $value
     * @return boolean
     */
    public function isValid($value)
    {
    	if(!is_array($value) OR sizeof($value) &lt; 2) {
			$this-&gt;_error(self::MISSING);
    	}

    	$this-&gt;_field1 = array_shift($value);
    	$this-&gt;_field2 = array_shift($value);

        if($this-&gt;_case === true) $function = 'strcmp';
        else $function = 'strcasecmp';

        if(0 !== $function($this-&gt;_field1,$this-&gt;_field2)) $this-&gt;_error(self::NOT_EQUAL);

        if (count($this-&gt;_messages)) {
            return false;
        } else {
            return true;
        }
    }
}
?&gt;</pre>
<p>Here is a sample test case. Validate password and confirm password elements represented by &#8216;password&#8217; and &#8216;cpassword&#8217; element names respectively.</p>
<pre class="brush: php">$filters = array('password' =&gt; 'StringTrim', 'cpassword' =&gt; 'StringTrim');
$validators = array(
    'Password' =&gt; array(
        'presence' =&gt; 'required',
        array('StringLength',5,15),
        'fields' =&gt; 'password',
        'messages' =&gt; "Passwords must be between 5 and 15 characters in length."),
    'Confirm password' =&gt; array(
        array('StringEquals'),
        'fields' =&gt; array('password','cpassword'),
        'messages' =&gt; array(
            0 =&gt; array(
                Zend_Validate_StringEquals::NOT_EQUAL =&gt; "Passwords does not match.",
                Zend_Validate_StringEquals::MISSING =&gt; "Both password fields must be filled."))));

$inputdata = new Zend_Filter_Input($filter,$validators,$_POST,$options);</pre>
]]></content:encoded>
			<wfw:commentRss>http://dotmanila.com/blog/2010/01/zend_validate_stringequals/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PCI Compliance</title>
		<link>http://dotmanila.com/blog/2009/10/pci-compliance/</link>
		<comments>http://dotmanila.com/blog/2009/10/pci-compliance/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 03:32:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Application Security]]></category>
		<category><![CDATA[Certifications]]></category>
		<category><![CDATA[Server Security]]></category>
		<category><![CDATA[pci compliance]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://dotmanila.com/blog/?p=94</guid>
		<description><![CDATA[It has not been long that I&#8217;ve become involved on many a client requests to make their servers PCI compliant. More often than not they would just pass onto us at least a 30 page report of what&#8217;s needed to be done to become &#8220;PCI Compliant&#8221;. This would often cause a short debacle between us [...]]]></description>
			<content:encoded><![CDATA[<p>It has not been long that I&#8217;ve become involved on many a client requests to make their servers PCI compliant. More often than not they would just pass onto us at least a 30 page report of what&#8217;s needed to be done to become &#8220;PCI Compliant&#8221;. This would often cause a short debacle between us and the clients since merely looking at the report and evaluating what is needed to be done on our part already costs our time.</p>
<p>The point of this article is how much should we get involved on getting our customers &#8220;PCI Compliant&#8221;?</p>
<p>From a customer&#8217;s point of view, generally they would expect all the technical work necessary be done out of the report. From my point of view, this should not be the case. Security compliance is another box when it comes to web hosting, if the customers are employing a third party security company then they should do most of the leg work. We do not need to analyze pages of report that those security comapnies are supposed to be doing. We&#8217;d more than happy to get the customer compliant, but we only need the specific technical points to do our part. Yes, the customer gets confused at first when we throw back at them these ideas, fortunately they would get our point and point back to the security vendor then the vendor liasing directly back to us.</p>
<p>I&#8217;d hope there is a much more structured process between the security vendor, the customer and the hosting company. How about you, how have you been doing so far as a customer, vendor or a hosting company  with your part on the PCI compliance process?</p>
]]></content:encoded>
			<wfw:commentRss>http://dotmanila.com/blog/2009/10/pci-compliance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stealing your RFID Enabled Cards</title>
		<link>http://dotmanila.com/blog/2009/02/stealing-your-rfid-enabled-cards/</link>
		<comments>http://dotmanila.com/blog/2009/02/stealing-your-rfid-enabled-cards/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 11:36:02 +0000</pubDate>
		<dc:creator>jervin</dc:creator>
				<category><![CDATA[Application Security]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[rfid hacking]]></category>
		<category><![CDATA[wireless security]]></category>

		<guid isPermaLink="false">http://dotmanila.com/blog/?p=42</guid>
		<description><![CDATA[Security researcher Chris Paget recently drove around downtown San Francisco to clone RFID base Passports and Drivers Licenses using an inexpensive kit of wireless tools. More at theregister.co.uk: Using inexpensive off-the-shelf components, an information security expert has built a mobile platform that can clone large numbers of the unique electronic identifiers used in US passport [...]]]></description>
			<content:encoded><![CDATA[<p>Security researcher Chris Paget recently drove around downtown San Francisco to clone RFID base Passports and Drivers Licenses using an inexpensive kit of wireless tools. More at theregister.co.uk:</p>
<blockquote><p>Using inexpensive off-the-shelf components, an information security expert has built a mobile platform that can clone large numbers of the unique electronic identifiers used in US passport cards and next generation drivers licenses.</p>
<p>The $250 proof-of-concept device &#8211; which researcher Chris Paget built in his spare time &#8211; operates out of his vehicle and contains everything needed to sniff and then clone RFID, or radio frequency identification, tags. During a recent 20-minute drive in downtown San Francisco, it successfully copied the RFID tags of two passport cards without the knowledge of their owners.</p></blockquote>
<p><a href="http://www.theregister.co.uk/2009/02/02/low_cost_rfid_cloner/" target="_blank">http://www.theregister.co.uk/2009/02/02/low_cost_rfid_cloner/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dotmanila.com/blog/2009/02/stealing-your-rfid-enabled-cards/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

