PHP Classes

A tiny improvement

Recommend this page to a friend!

      PicasaWeb class  >  All threads  >  A tiny improvement  >  (Un) Subscribe thread alerts  
Subject:A tiny improvement
Summary:How to "tighten up security" at least a little bit.
Messages:2
Author:Joern Heller
Date:2009-06-23 10:14:57
Update:2009-06-23 10:59:48
 

  1. A tiny improvement   Reply   Report abuse  
Picture of Joern Heller Joern Heller - 2009-06-23 10:14:57
Hi all,

first things first: Great class! Easy to use and a fully featured example. However, some improvements could be made (in order for the example to function well and to "tighten" up the security issues related to getting pivasa images over the weg by using the provided calls).

A tiny type on the example:
file: picasaweb.class.php
line 21: delete one "p" in "disphoto.php" or rename the file

Now to security:
in file disphoto.php
line 10: remove username and password and use the following line
$uri="pwaphoto.php?albumid=$_GET[albumid]&photoid=$_GET[photoid]";

then, in file pwaphoto.php
fill in the correct username and password in PHP
line 13: use $oPwa->login("xxxxxxx", "yyyyyyy");
instead of providing a "readable" URL

This way, the credentials could still be sniffed but at least not easily read by everyone...

Cheers,

Joern

  2. Re: A tiny improvement   Reply   Report abuse  
Picture of Thomas Jakober Thomas Jakober - 2009-06-23 10:59:48 - In reply to message 1 from Joern Heller
You are right, there ist not much security in the example. I wanted to hold the example as simple as possible. The example is intended to show how it works rather than to use as an application.

To improve the security I suggest to put the object in a session variable or work with ajax using post variables.

Thomas