Community Page
- bradshawenterprises.com/blog Jump to website »
-
Subscribe -
Community
-
Top Commenters
-
Popular Threads
-
Recent Comments
- You're a great man, I love you
- Really, you are
- YOU ARE AMAZING!
- You may add color to your shell , configure aliases , configure autorun bash logon scripts ,you can search through the history using ^r , you can type !! to be automatically replaced by the last...
- Windows 7 is my favorite OS. I wait for it long time. And I think so much and decide to install http://rapid4me.com/?q=Windows+7+Build
Jump to original thread »
Image via Wikipedia
Having talked to some university students who had taken computer science/IT degrees, I was amazed by how little they seemed to know about making anything that’s secure or even remotely logical. The group I met with primarily had been taught PHP. Having looked at some sites they were designing I realised 5 things [...] ... Continue reading »
Having talked to some university students who had taken computer science/IT degrees, I was amazed by how little they seemed to know about making anything that’s secure or even remotely logical. The group I met with primarily had been taught PHP. Having looked at some sites they were designing I realised 5 things [...] ... Continue reading »
11 months ago
On production, always disable error output. Send your error messages to logs, but don't ever output them to the browser. Error messages, in addition to being unprofessional, can reveal details about your architecture that no one really needs to know.
Second, ALWAYS filter and validate input. Assume every user is trying to destroy your server. Go with a white-list approach. If an input is supposed to be a numeric ID, make sure it's numeric only. Make sure to run input through sanitizing like mysql_real_escape_string(). And if you're doing queries, make sure that your web user has ONLY the privileges it needs - don't give it drop table access or anything. If you want to go further, use two web users - one for read that only has select access, and the write, which has select, insert, update, and delete. Only use the write user when you actually need it.
Finally, when configuring your server, make the docroot as limited as possible. That is, stuff like include files and template files (if you have them) should not be accessible through the server.
Hope these tips help!
12 months ago
1 year ago
2 months later I get a call, that their guestbook was full of spam, and that it had broken completely recently (a meta redirect inserted in the comment).
I quickly added a captcha and made sure no SQL or Javascript injection was possible etc. This is a given today, no matter how small the project.
Good read.
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
You do have a point, however poorly written it may be. :p
1 year ago
1 year ago
1 year ago
we would be still using the tyre of rock
12 months ago
11 months ago
1 year ago
1 year ago
12 months ago
Use many functions instead of copy and paste, and use stlye classes instead of coyping single style attributes^^
12 months ago
A point though about naming of include files - the best solution is to place them in a directory that's not directly accessible to the web. Your PHP scripts will still be able to include them just fine.
If you do have to have them in a web-accessible directory for some reason, at least place them in a directory all of their own. Then place a htaccess file in there containing the following:
<Files *>
order allow,deny
deny from all
</Files>
It's a mistake to think that giving your includes .php extensions makes them entirely safe. Should anyone ever try to access them individually (which is fairly unlikely anyway) they might not see your raw PHP code, but that code would be executed, with unknown consequences.
12 months ago
12 months ago
11 months ago
10 months ago
Don't make your section headers smaller and less bold than your section content.
Why it's bad;
Because it's very hard to skim your page for the start of the next section.
9 months ago
8 months ago
its specific for Centos 5.2 but it should give anyone a pretty good idea.
5 months ago