News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Joshua Thijssen:
Symfony2 logging out
October 10, 2014 @ 10:51:03

In this new post to his site Joshua Thijssen talks about something that's usually considered a common task and might be overlooked when it comes to security: logging out (specifically in Symfony-based applications).

One of the "golden rules" of symfony2 is to never hardcode urls or paths inside your code or templates. And letting symfony deal with the generation of your urls and paths makes your life a lot easier as a developer. But one of the things I see regularly is that people are still hardcoding their logout urls like using "/logout". But logging out is actually a bit more complex than it might seem, and using a simple /logout might work for most cases, but there are better ways to deal with this.

To give some context, he starts with an overview of the Security component of the Symfony framework, mentioning how it can be configured with different "secure" areas and how they handle the user authentication. He includes an example configuration of one of these "firewalls" in a YAML document with three different sections: "dev", "superadminstuff" and "main". He explains what each of these sections are configuring and how they will react when the user visits them. He talks some about the "logout: true" handling and what kind of defaults are also included when it's called. He suggests that, instead of a hard-coded "logout" URL in your application, you make use of the "logout_url" and "logout_path" functions to create the link for you, making it consistent across the application and easier to configure.

0 comments voice your opinion now!
symfony logout security user login component link

Link: https://www.adayinthelifeof.nl/2014/10/06/symfony2-logging-out/

Cal Evans:
"Delivery Initiated" A word on having empathy for the users of your software
October 08, 2014 @ 09:24:37

In his latest post Cal Evans reminds us, as software developers, that our jobs aren't always about making the things we create about the best code or most tech. It's also about having empathy for users of the software you're building.

I learned something very important in all of [the troubles I had with traveling to Amsterdam], I learned that we as software developers and designers need to have a great deal of empathy for the people using what we build. It is not enough to put yourself in your user's shoes, you have to put yourself in their mindset. You have to design every user interaction with an understanding of not only who is using your software, but why they are using it.

He focuses the rest of the post on his experience post-delay, trying to get an update on where in the world his luggage might be via a URL given to him by the lost luggage group. He comments on the terseness of the message he was given on the page ("Delivery Initiated") but points out that it's not overly user-friendly and really doesn't give much information. He suggests that the developers of the tool didn't actually think about end users, just that they should share a status and that's all.

It is not enough to create personas and figure out who is using your software. You need to understand why they are using it, and what their mindset will be when they are using it. You need to have empathy for your users.
0 comments voice your opinion now!
user empathy system opinion travel luggage delivery

Link: http://blog.calevans.com/2014/10/07/delivery-initated-a-word-on-having-empathy-for-the-users-of-your-software/

The Code of a Ninja:
Salt, Hash and Store Passwords Securely with Phpass
June 16, 2014 @ 11:15:37

In this post to the CodeOfANinjs.com site, they walk you through password hashing, salting and storage using the PHPAss tool from OpenWall. The post itself is a bit older, but the content still provides a good example to teach the basics.

I think the main reason why we have to hash passwords is to prevent passwords from being stolen or compromised. You see, even if someone steal your database, they will never read your actual or cleartext password. I know that some PHP frameworks or CMS already provide this functionality, but I believe that it is important for us to know how its implementation can be made.

The tutorial shows you how to use the library and how to store the result in a simple "users" table in a MySQL database. The examples hash the password given from a simple form and use prepared statements (via PDO) to save it to the database. All PHP, HTML and CSS code you'll need - including the login form that checks the username/password - is included. There's also a few screenshots showing what the resulting forms and data should look like.

0 comments voice your opinion now!
phpass tutorial hash salt password storage mysql user

Link: http://www.codeofaninja.com/2013/03/php-hash-password.html

Nomad PHP:
November 2013 - Ed Finkler, "More Code, More Problems"
August 30, 2013 @ 10:38:38

The Nomad PHP (virtual) user group has announced their speaker for the November 2013 meeting - Ed Finkler talking about the problems that come with having "more code" in your applications.

In this talk I'll extend the concepts to other languages we work with in web development, establishing these core principles: Learn languages, not frameworks, build small things, less code is better than more, and create and use simple, readable code We'll cover how following these principles makes you a better developer, and makes the job of maintaining and verifying your code much easier.

The meeting is on November 14th and you'll have to sign up if you'd like to attend. There's a $10 USD cost for a ticket and you can purchase them right up until the event.

0 comments voice your opinion now!
edfinkler nomadphp november virtual user group

Link: http://nomadphp.com/2013/08/29/november-2013/

Reddit.com:
Tools to test a REST API?
August 16, 2013 @ 12:53:17

On Reddit.com today there's a post asking for suggestions of tools to test a REST API from the outside (like a user, not unit testing).

Does anybody know of any tools to test a rest API from the POV fo a client? Behat and Cucumber seems to be cool, but are these the right tool to benchmark directly through http?

There's a wide range of suggestions including:

0 comments voice your opinion now!
testing tool suggestion rest api user http

Link: http://www.reddit.com/r/PHP/comments/1kg515/tools_to_test_a_rest_api

Sameer Borate:
Simple user authentication in Laravel 4
June 17, 2013 @ 14:22:01

Sameer Borate has a new post today showing how you can do simple user authentication in a Laravel 4-based application using the built-in Auth functionality.

With the recent release of Laravel 4, PHP developers have at their disposal one of the finest frameworks for application development. As with all new frameworks, it is always good to write some quick code to get a feel for the underlying architecture. The following post shows a simple authentication application using Laravel.

He walks you through the creation of the simple "users" table, the configuration the Auth class will need to connect and authenticate and the form for the login. He also shows the steps for the actual authentication process as well as the code for the routes to make it all work. Additionally, he shows how to restrict pages to only those with the "admin" level access via an auth filter. You can download the example code here.

0 comments voice your opinion now!
user authentication laravel4 tutorial database auth admin

Link: http://www.codediesel.com/frameworks/simple-user-authentication-in-laravel-4

PHPMaster.com:
Openbiz Cubi A Robust PHP Application Framework, Part 1
May 17, 2013 @ 10:36:20

On PHPMaster.com today they've posted the first part of a series spotlighting Openbiz Cubi, a PHP "framework" with a business focus.

Openbiz Cubi is a robust PHP application framework giving developers the ability to create business applications with minimal effort. In this two-part series I'll explain the concepts and steps necessary to create your own business web applications with Cubi. We'll look first at the challenges web developers face and how Openbiz Cubi can help, and then how to install Cubi. In part 2 we'll see how to create our own modules.

They start off by describing the tool and some of the features that come with it (including user management and the XML data object structure). Complete installation instructions are included and a screenshot is included of the end result. They include a "quick tour" of Cubi's features and some of the modules that come with it like the System, Menu and User modules. In part two of the series, they'll show you how to create a custom module.

0 comments voice your opinion now!
openbiz cubi framework application modules user role

Link: http://phpmaster.com/openbiz-cubi-a-robust-php-application-framework-1

MaltBlue.com:
Zend Framework 2 Forms - Simple and Available Everywhere
April 04, 2013 @ 11:29:49

Matt Setter has a new post to his site today about forms in Zend Framework 2 including a full example on how to use them to create a form for user information (first name, last name).

I think it goes without saying, forms are one of the central elements of any web-based application. They're used for everything from logging in, to searching content and managing information. Given that, they should be first-class citizens, able to be developed and reused with relative ease. [...] However, given the amount of options, configurability and flexibility required, this isn't always easy. [...] In today's post, I'm going to assume you have a basic understanding of how forms work now. [...] I'm going to show you how to create flexible, reusable forms in one module and by the power of the ServiceManager reuse them throughout your application.

He starts with the inclusion of a dependency needed for his example - the ZfcUser component (installed via Composer). He then moves on to the actual code for the form creating a reusable module, an entity class for the User and the Fieldset/Form classes for the contents of the form. He also includes the code for the controller action and the view that outputs the form itself and handles the repopulation automagically (and includes a CSRF token).

0 comments voice your opinion now!
zendframework2 form tutorial module zfcuser user

Link: http://www.maltblue.com/zend-framework/simple-zend-framework-2-forms

PHPMaster.com:
Authenticate Users with Mozilla Persona
December 03, 2012 @ 11:18:09

On PHPMaster.com there's a new tutorial from Vito Tardia about using the Mozilla Persona authentication system in your PHP application - an abstracted authentication system that keeps only a token representing the user in your system.

Mozilla Persona is built upon the BrowserID technology also developed by Mozilla. You can find an expanded explanation of the concepts in the article How BrowserID Works by Lloyd Hilaiel. [...] An email address is an identity and it's verified by the email provider [then the] authentication takes place in the browser.

He talks about the three steps in the process (certificate provisioning, assertion generation and assertion verification) and includes some sample code that does the work for you with some PHP, HTML and Javascript. In his example he just authenticates the user and returns the success/fail back to the calling script. You could take it one step further and integrate it with the session handler as well.

0 comments voice your opinion now!
authenticate user mozilla persona javascript sso browserid


PHPMaster.com:
5 More PHP Security Vulnerabilities
November 13, 2012 @ 14:42:02

On PHPMaster.com there's a continuance of a previous article about security in PHP applications talking about a few more considerations when trying to make things secure.

In a previous article, I talked about some common security vulnerabilities that can affect your PHP web application. But there are other things besides those ten (okay, seven) attacks to think about when you're developing. And so, this article offers a compendium of miscellaneous things that are security related; things you should do, things you shouldn't do, things that other people might try to do, whatever it takes to make an article long enough for my editor to be satisfied with it.

He talks some about the settings that you might need to tweak in your "php.ini" server-side configuration file, some hints on filtering data (like using filter_input) and what to watch out for with error reporting. He also mentions session fixation and the protection of user data and passwords to keep them out of the hands of would-be attackers.

0 comments voice your opinion now!
security vulnerability tutorial phpini filterinput session fixation user



Community Events





Don't see your event here?
Let us know!


opinion symfony install podcast library language framework bugfix series list introduction deployment release package laravel api interview tips community voicesoftheelephpant

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework