CakePHP 2 aggressive Security – continued


CakePHP 2.0 has another aggressive security which is shown clearly when trying to make an ajax request to an action via method POST, it fires security error that says "Request is blackholed due to auth". The Solution to disable this aggressive validation for this action to set security attribute $validatePost to false.   property SecurityComponent::$validatePost Set … Continue reading CakePHP 2 aggressive Security – continued

Flash objects overlay problem


How to make flash objects overlaid by another html elements? simply by using the wmode attribute and set it to transparent wmode - Possible values: window, direct, opaque, transparent, gpu. Sets the Window Mode property of the SWF file for transparency, layering, positioning, and rendering in the browser. If this attribute is omitted, the default value is "window". For more … Continue reading Flash objects overlay problem

Javascript: dealing with cookies


function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; } function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = … Continue reading Javascript: dealing with cookies

SWF flash files ignore stacking order, play on top of DHTML layers


Issue A SWF file in a layer on a DHTML page containing several layers displays above all the layers regardless of the layers' stacking order ("z-index"). Solution Use the WMODE parameter to allow layering of rich media content with DHTML layers. The WMODE parameter can be "window" (default), "opaque," or "transparent." Using a WMODE value … Continue reading SWF flash files ignore stacking order, play on top of DHTML layers

FTP connections and file transfers


$file = 'somefile.txt'; $remote_file = 'readme.txt'; // set up basic connection $conn_id = ftp_connect($ftp_server); // login with username and password $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); // upload a file if (ftp_put($conn_id, $remote_file, $file, FTP_ASCII)) { echo “successfully uploaded $file\n”; } else { echo “There was a problem while uploading $file\n”; } // close the connection … Continue reading FTP connections and file transfers

Secure copy via ssh connection


scp allows files to be copied to, from, or between different hosts. It uses ssh for data transfer and provides the same authentication and same level of security as ssh. Examples: Copy the file "foobar.txt" from a remote host to the local host $ scp your_username@remotehost.edu:foobar.txt /some/local/directory Copy the file "foobar.txt" from the local host to a remote host … Continue reading Secure copy via ssh connection