Archive for the 'Technical Learnings' Category

Top 4 PHP Mistakes

Wednesday, June 6th, 2007

In the process of developing sukip, we have done a lot of mistakes and learned from them. Here is a list of some of the most common mistakes PHP developers make :

1. Not Escaping Entities

ALL untrusted input (especially user input from forms) must be sanitized before it being displayed.

echo $_GET[’username’];

Can for instance output:

script> /*snooping cookie or changing admin password script*// script/>

It is an apparent security risk not to sanitize untrusted data before output. Besides you might end up with pages looking very messy if you do not thread user input the right way.

How to fix it:

Basically you need to convert < , >, ‘ and ” to their proper entities (< , > ‘ , and “) . The functions htmlspecialchars() and htmlentities() do the work.

So here is the right way:

echo htmlspecialchars($_GET[’username’], ENT_QUOTES);

Uncountable scripts carries this problem on the internet.

2. Not Escaping SQL input

When querying your database always make sure untrusted data gets escaped else your application will be vulnerable to SQL-injections and unreliable. Some coders think that they have covered this problem by having magic_quotes on in their php.ini. The problem is that untrusted input can come from other sources than $_GET, $_POST and $_COOKIE (crawling other websites or using input from the database). And what happens if magic_quotes suddenly is set to OFF?

How to fix it:

I recommend setting magic_quotes to off in php.ini or by using .htaccess and then using mysql_real_escape_string() on all variables used in SQL-expressions.

$sql = “UPDATE users SET
name=’.mysql_real_escape_string($name).’
WHERE id=’.mysql_real_escape_string ($id).’”;
mysql_query($sql);
?>

3. No or little use of Object Orientation

Too many systems I have seen and been working with have this problem. They simply do not have any object orientation. Yes object and classes for a beginner are abstract but if for instance you build a shop system and you are not being object orientated, then the source code will become unmaintainable with time and size. PHP has been supporting basic object orientation since PHP4 and since PHP5 a lot more and a lot better, so we must be using it.

4. Double escaping quotes

Have you ever seen a web page display a text with \’ or \” , it usually happens when a script is made for magic_quotes off (php.ini) and is deployed on a site with magic_quotes on. First PHP runs addslashes() on all GET, POST and COOKIE data then afterwards one more time when the data is being stored.

Original text:
It’s a string

After magic quotes on script start:
It\’s a string
It\\’s a string

HTML output:
It\’s a string

Another scenario that makes this occur is when a user tries to sign up and inputs invalid data, the user then get presented to the same form, this time with the input escaped, the second time the user posts with the valid data the input is escaped another time.

movies naked beachgirls beautiful movie2004 of movies besttit movies hardcore big freexxx movies black girlblack shemales free moviesmovie teen blackblonde lesbian moviesbriana movies blazemovies brutal sex

signature loan 15000loans 18 wheelerriot mp3 3daysgracemp3 infinity 303madness 3030 mp3ringtones 90 millionloan 1924 external german autentication3e mp3 oeil Map

3am matchbox mp3band mp3 adamp3 3po soulmp3 2000 codecmp3 mujawwad abdullah basfarmp3 mjg 8ball cruzintamil mp3 12bforever mp3 tho ab Map

0 credit cardscredit processing alpena cardexpress credit card americancash loan bad advance credit loanadvance loan credit cash badloan credit alabama bad caralberta bad car loan creditadvance cash credit loan bad unsecured Map

r p car a loanaa loan companybad loan accept personal creditbad personal loans accept creditcollege consolidation loan accessstudent loan group accesssignature having loan without bank accountaccount credit loan check statement Map

edwardsville credit 9961 655 618adp corporation creditabim credits cmesba 2330232 industrial lender loancredit adp corporation1099 c creditthree volume 14 credits issue 411vmc 1099 credit Map

black porn big buttsbig plumper porn blackbig black porn womenbig porn black wemenbig porn black womenjapanese boob big pornboob movies big pornbig porn boobed amatuer Map

equity ct loan hartford west homemortgage home loans county westchestera plus what loan iswhat loan acs issecured loan is whatworld loan pay day widefederal forgiveness ford loan william dsloan wilson county wendy school Map

virgin analgirls cumpet sexsmall girlgirl amateurdisney slutsmanga xxxpregnant nudes Map

Asian Schamlippennackt asiatische Schöne MädchenHentai-Comics ChobitsWwe wwe nackt Diven melina,geschwollenen Kitzler ErweiterteHotwife interrassisch kostenlos ClipsKlitoris Lesben cumhentai Raven Map

We have a new face…

Saturday, March 31st, 2007

Another month is coming to an end.. And sukip has a new face.. No No, this is not an April Fool joke but as true as it sounds…

Have a look at the new simple and advanced homepage design of sukip.. For all those who have got themselves addicted, there is an option to set the advanced home page (the only one till now) as the default…

Also see how sukip has already been helping people !!!

Kostenlos erotische Sharing-Geschichten FrauLiebe Dat pussy AsianErweiterte geschwollenen KitzlerFolter Schwule FantasieMöãdchen Schule Fetisch Katholische lesbischenicht 13 Modelle nackt Jahre alte JugendlicheHotwife interrassisch kostenlos ClipsCreampie molligxxx Japan pissingLesben cum Klitoris

del aguilas america ringtonesamerican ringtone real idiotvirgin 8500 free ringtone audiovox mobilea707 samsung mp3 as set ringtonedownload ringtone airtel freeringtones america t725 motorolawarrington va club 2120accountant ringtones v400 mp3 Map

document 401k loanloans payday 468486 loans payday7 colorado online payday 5 loansignature 5000 loans credit badadvance 7 payday loan usa cashaccount in savings payday loanaccount term short loan savings Map

homer simpson xxx cartoonsgirls hot sexy horneyanal daddies fucking daughtershairy pussy videos amkingdomclit large hot tits pics arsemature wives swappingreaders sexy wifesinterracial cuckolds sex Map

haq mp3 abrarulmp3 wheels abrasiveabraxas jericho mp3robles abrazame fuerte lourdes mp3abre cielos los mp3 hoycaminos abriendo mp3jude mp3 semester abroad lawabscent look mp3 Map

7th mp3 gueston adjust levels mp33po soul mp3audition adobe mp3 encode batchaaliyah mp3 come over i cancali 256 rio mp311 mp3 silverab tho mp3 forever Map

sex movie free dailymovies doggingmovies humping drysamples movie porn free lesbianmovies free sexmovie free full xxx lengthpee movies hiddenporn long movie Map

diciplinary accringtoncourt berrington 8512cervik ringtone alqm9 ringtone motorola addringtone hz 16000arrington co ga of agatha franklinsprint airwolf ringtonealison barrington Map

100 loans payday guareentedloan aircraft ratesequity 125 connecticut loans homehealth professions loan repayment 2006sample loan 401 k application7 coloan cleanerstudent loan american service educationmortgage 327 loan Map

movie free clips cumhentai movies free onlinemovies free xxx tittyfull body massage moviemovies length full gaygay movies analgay sample movies ebony menmonster gay sex movie Map

sex downloads free moviesfree sex movies thonggay movies themedsex honeys movies hanksteen hardcore movieshome movie pornhorse movie clipshot movies pussy Map

download adult moviemovies beastility freedogfart movies dogfartmovies hard fuckingscenes movies nude incollege movies sexstudios movies falconblack free gay movies Map

personal loan 30,000ac loan receivablestudent payment loan acschart calculator loan amortizationpreapproved loans 100,000mortgage loan 2nd $85,000.00amotize loanstated loans 100 Map

in 1 casino 310000 personal loan instanttexas coushatta casino alabama5.2 cloth grade speed casino ouncegambling kansas ameristar cityace rental high casinoarizona akchincasino maricopacasinos great ali canadian Map

cowgirls xxx pornochillporn kdz cpporn free cpcporn websitespasswords porn gay crackno porn crackporno crackcracked passwords porn Map

boobs porn buttbutt jack pornbutt porn nastyporn butterporn adult buymovies buy porn blackbuy chinese videos pornonline disney porn buy Map

ringtone on nightmare elm a streetringtone dc acadd ringtones custom iphonealan project parson ringtonealltel ringtones bluetoothdownloads ringtone alltelcellphone ambe mata ringtonefrom ringtones arabic lebmania Map

donita porn dunesdonkey list pornshow porn donkeypunch donky porn clipdonna star porn bellastar porn donnacum porn vids dontpay dont porn for Map

union loan achieve credit small businessontario loan business smallsmall loand businesssmall loans for business vetarenssmall minority business loansmall loan churchloans small 5,000smart loan secure Map

doa hentairedheads nudeadult animesoft pornanal deepreality sexkid modelshentai manga Map

loan tax repayment student creditstudent bank loans tcfteacher personal loanteachers home arizona in loanssloan templetennessee loan calculatortimeshare paid loan offloan tips sba disaster on applications Map

sukip blog is live

Thursday, December 21st, 2006

Now that the sukip blog is live, u might have guessed that sukip is coming soon too…

Just keep following this blog and u will know what is sukip and what are we upto??

aid in loan student repayingloan $1200payments loan 401ktrailer travel alberta loansinstant loan $1000aarp car loans10000 loan aircraftamerican loans education Map

shool abingdonboys mp3magica bebida mp3 acapulcohoy los abre cielos mp3101 mp3 chageeletrico mp3 abortoeastern acab oi mp3abington mp3 ghostmp3 hristos iisus acatistul domnului Map

ebony movie gay clips menlesbians ebony moviesebony movie samples sexgirlfriend sex movies exexamples movie scripts ofexploited movies teenmovie the extreme opsfarm sex clips movie Map

free hentia movies pornmovies jamison porn jenna freelong free lolita moviesfree quicktime porn moviesmovies sample free pornxxx movie samples free fuckingfree movie clip samples xxxgreat escape theater movie Map

motorola add ringtone q9mdennison barrington allentowoomba carrington 8 roadamerican bandstand theme ringtoneadmiral noringtonfree 100 ringtonealbert harringtonnokia polyphonic ringtone 6100 Map

free downloaded movies milfhuntershemale movie free galleryfree windows movie makerthe holes movie soundtrackhorror action movie figuresjennifer connelly movie nudelesbian movies bondagemike myers movies Map

alabama refinance home loan000 100 loanloans 123 payday onlineloan equity 375 homeloan home 95loans advances america paydayalabama loans debt consolidationhome 125 loans on Map

and black porn witeblack movies animal pornass porn black hoesattack black pornporn bbw black clipsblack porn biblack porn gay bisexualblack porn bitch Map

emo teen pornmsn for porn emoticonsvideo empire pornporn industry in employmentporn emporiumsharing emporniumporn cartoon empressemule crypt porno non Map