LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices

Old

Bash input validation

Posted 01-11-2006 at 08:28 PM by unSpawn

Takes argument and stops when character outside restricted set is found.
Don't know how much slower, didn't run any timing tests with or without yet.

Code:
val_str() {
        declare -r str_allow="1234567890-_.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ "
        declare -r str_len="128"; str=( "$1" ); if [ -z "${str}" -o "${#str}" -gt "${str_len}" ]; then return 1; fi
        charLim=$[${#str}-1];
...
Moderator
Posted in Uncategorized
Views 2685 Comments 1 unSpawn is offline
Old

PHP, aka Pretty Hosed Programming

Posted 01-11-2006 at 08:02 PM by unSpawn

If you've read the SANS Top 20 of 2005 (http://www.sans.org/top20/)) there is a clear message with respect to deploying PHP-driven applications: be paranoid or be cracked. A short tour of a few vulnerability reporting sites show that with programmers who can't be arsed to follow the most basic principles of programming, who force users to run their app with all essential security features off and with undereducated users running apps without questioning this will be another wonderful year for your...
Moderator
Posted in Uncategorized
Views 839 Comments 0 unSpawn is offline
Old

Vista Iced 'til 2010, Microsoft says.

Posted 01-10-2006 at 09:52 AM by unSpawn

Quote:
"In an effort to regain dwindling consumer trust Microsoft has decided to reschedule the release of Micosoft's Vista.
All resources are being redirected to building a more secure O.S. before introducing new bugs."
OK. So that's not going to happen, right? I think it should. Those who (are forced to) pay to use Mockerysofts products should have a vote in what should happen next instead of letting the marketoids reign.
Moderator
Posted in Uncategorized
Views 744 Comments 2 unSpawn is offline
Old

--init

Posted 01-10-2006 at 09:39 AM by unSpawn

This is my scratchpad.
It's not a Blog.
I don't read Blogs.
Moderator
Posted in Uncategorized
Views 767 Comments 0 unSpawn is offline

  



All times are GMT -5. The time now is 01:42 PM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration