 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
PHPMaster.com: Creating a PHP OAuth Server
by Chris Cornutt January 01, 2013 @ 11:56:46
On PHPMaster.com today there's a new tutorial posted about creating your own OAuth server in PHP using the oauth-php package to do the "heavy lifting".
If you've ever integrated with another API that requires security (such as Twitter), you've probably consumed an OAuth service. In this article, I'll explore what it takes to create your own three-legged OAuth server allowing you, for example, to create your own secure API which you can release publicly.
They include a visual representation of the OAuth authentication flow (it's not the simplest thing) and the database structure/sample code you'll need to get the server up and listening. Also included is a registration form and how to generate a request token and give back an access token. There's also some sample code showing how to validate the request and it's access token to check for a correct (and allowed) request.
voice your opinion now!
tutorial oauth server oauthphp flow authentication access validate
Reddit.com: Protecting against attack?
by Chris Cornutt May 18, 2012 @ 10:19:35
In this recent post to Reddit.com, the question of application security is asked - the poster wants recommendations on how he should keep his app safe from would-be attackers:
I can code fairly well in PHP these days, but my security isn't so hot. Is there a tutorial or plugin you guys can recommend as to how I should be protecting my php pages/inputs? I want to avoid common attacks like XSS, inputs with NULL or DROP TABLE etc?
Responses on the post include recommendations related to:
- Using the Chorizo scanner to find common issues in your code
- Using PDO for database connections (with bound parameters)
- Not trusting "$_SERVER"
- Data sanitization
There's also links to a few other resources with more details.
voice your opinion now!
security attack opinion xss pdo validate filter
PHPMaster.com: PHP Security Cross-Site Scripting Attacks (XSS)
by Chris Cornutt May 01, 2012 @ 11:59:28
PHPMaster.com has a new tutorial posted today (by George Fekete) about preventing cross-site scripting attacks in your PHP-based applications.
Unfortunately, cross-site scripting attacks occurs mostly, because developers are failing to deliver secure code. Every PHP programmer has the responsibility to understand how attacks can be carried out against their PHP scripts to exploit possible security vulnerabilities. Reading this article, you'll find out more about cross-site scripting attacks and how to prevent them in your code.
Included in the tutorial is an example with a simple form and definitions of different types of XSS attacks - reflected XSS, persistent XSS and three ways to prevent them: data filtering, output filtering and data validation. He also links to a few "cheatsheets" to help even more (including this guide and a Zend Framework set of XSS test data.
voice your opinion now!
tutorial security xss filter validate data output cheatsheet
DeveloperDrive.com: What Web Developers Need to Know About Cross-Site Scripting
by Chris Cornutt October 17, 2011 @ 13:39:23
On the DeveloperDrive.com site there's a recent post anyone wondering about cross-site scripting should give a read. They introduce you to the basic concept and two things you can do to help prevent them.
This little fable describes the most common vulnerability found in web sites, the Cross Site Scripting (XSS) attack. According to a report from WhiteHat Security 83 percent of websites they tested have had at least one serious vulnerability and 66 percent of all websites with vulnerabilities are susceptible to XSS attacks making it the most common vulnerability web developers face. To fix this, it takes 67 days on average. Tools like WebScarab and Paros Proxy can be used to scan sites for possible vulnerabilities.
They offer two simple pieces of advice that it's all too easy to forget when developing applications - validate all user input to ensure it's what it should be and escape any untrusted output (even sometimes your own!) before pushing it out to the page.
voice your opinion now!
crosssitescripting xss introduction validate filter input output advice
SkyTechGeek.com: 10 Exceptional Tools For Website Testing
by Chris Cornutt August 23, 2011 @ 13:25:22
Sometimes a little (external) testing of your website is in order and Gagan Chhatwal has posted his list of ten tools you can use to check everything from how much load the site can take to what can be done to optimize the load time.
When maintaining or running a website , Webmasters need to keep in mind that one of the pertinent issues they will need to focus on is :Website Testing, which is not only vital for the website itself but for the user as well and one should not overlook its importance. [We have] collected some vital and free website testing tools which will help Webmasters in testing their sites thus saving users to conduct time consuming needless searches in finding the best resources pertaining to Web related tools and info.
Among the tools on the list are services like:
Most of these resources are free services, if not then they have a trial where you can see if it's a good fit.
voice your opinion now!
testing external service load validate speed monitor
Court Ewing's Blog: Create and Validate a Choice List in a Symfony 2 Form
by Chris Cornutt August 17, 2011 @ 08:28:21
Court Ewing has written up a new post to his blog about creating a "choice" list (a select list as defined by Symfony 2) with dynamic options and validating the resulting submission. His example uses Doctrine 2 entities to work with most of the data handling.
A standard select list can be created using Symfony's choice field type; it is pretty clear how to create a new choice field with simple, non-dynamic options (e.g. gender), but it gets a little more complicated when you want to create and validate a dynamically generated choice list.
He includes the code for a simple entity, a Post model to fetch the category information and the set up of the form element - a select list of post types/categories. He also includes a bonus section showing how you can achieve the same thing without a model to bind to.
The code's a little bit more complex than the previous example, but it's basically just reproducing some of the validation and fetching logic manually.
voice your opinion now!
create validate tutorial symfony2 form select choice dynamic
Zoomzum Blog: 10 Powerful PHP Regular Expression For Developers
by Chris Cornutt July 27, 2011 @ 09:02:10
On the Zoomzum blog there's a new post with ten regular expressions PHP developers can use to accomplish some common tasks (like email validation and date formatting checks).
Regular expression for the PHP developers, on of the most popular tool for validating data is the regular expression. In this list we provides some validation - string match, password match validation, email address validation, date format and many more which helps developer to make their application more fast and easy to execute. [...] Have you note that, regular expressions are more slower than the basic string function, its takes a short time to execute than any others.
Included in their list are things like:
- Password Match Validation
- Validate URL
- Validate URL using Preg_match
- UK Postcode Validation
- SSN,ISBN and Zipcode Validation
A few of these could be done with either one or two string calls or some of the filtering functions that are included in PHP.
voice your opinion now!
regular expression hint list validate regexp
Rob Allen's Blog: Validating dates
by Chris Cornutt November 09, 2010 @ 12:11:12
In a new Zend Framework related post to his blog today Rob Allen takes a look at a different operating mode he found with Zend_Date changing how it handles format specifiers.
I discovered recently that Zend Framework 1's Zend_Date has two operating modes when it comes to format specifiers: iso and php, where iso is the default. When using Zend_Validate_Date in forms, I like to use the php format specifiers as they are what I'm used to and so can easily know what they mean when reviewing code that I wrote months ago.
His example code shows how you can use the standard date formatting strings in a Zend_Form validator (the "php" format) and an example using the Zend_Date::MONTH or Zend_Date::YEAR identifiers (the "iso" format). He also shows how he met two other requirements - validation for empty and a consistent format on the date validation ("Y-m-d").
voice your opinion now!
validate date zendform zendframework iso format
|
Community Events
Don't see your event here? Let us know!
|