Author |
Message |
technocrat
Life Cycles Becoming CPU Cycles
![](modules/Forums/images/avatars/d867b24b43a1b71491557.jpg)
Joined: Jul 07, 2005
Posts: 511
|
Posted:
Fri May 29, 2009 3:35 pm |
|
For anyone that has been around for awhile knows I have been working on a class to take in PHP input and put it through a bunch of validation processes. Well I finally have made a standalone library to do this. It's still a bit of a work in progress so I would appreciate any feedback.
Check it out:
http://www.assembla.com/wiki/show/phpInputValidator/ |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! / Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
duck
Involved
![Involved Involved](modules/Forums/images/ranks/4stars.gif)
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Jul 03, 2006
Posts: 273
|
Posted:
Fri May 29, 2009 4:06 pm |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Dawg
RavenNuke(tm) Development Team
![](modules/Forums/images/avatars/46907b8543f928e08c8d7.gif)
Joined: Nov 07, 2003
Posts: 928
|
Posted:
Fri May 29, 2009 6:21 pm |
|
That is SUPER Spiffy!
Dawg |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
duck
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Sep 02, 2010 12:39 pm |
|
Can anyone tell me if Ravennuke Team intends to incorporate this class into upcomming editions of RN?
Reason I ask is I am working on some RN compatible mods that I will eventually release public and I would like to know if I can utilize the functions of this class without having to do all the darn work of incorporating this class myself as well. This way if someone is already working on the incorporation of it I can focus on the mod development while making it latest and greatest security compatible.
Thanks |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
technocrat
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Sep 02, 2010 12:53 pm |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
kguske
Site Admin
![](modules/Forums/images/avatars/41f0b40a419280935f3a0.gif)
Joined: Jun 04, 2004
Posts: 6437
|
Posted:
Thu Sep 02, 2010 3:19 pm |
|
Actually...we are planning to include it in version 3.0 |
_________________ I search, therefore I exist...
Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
duck
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Sep 02, 2010 5:38 pm |
|
I am aware of the site and was there poking around at the demo. Haven't had a lot of time to look at code or play with all your demo options yet but one thing I did notice (and since you asked about suggestions) is with IP options it translates literially to string and I was thinking a suggestion could be (if you haven't already done this?) is have an option in that portion of the function to set whether to Trim and/or Pad leading 0's? So you could choose to store or display IP's in a consistent manner in case one person puts in 002.001.254.021 vs the guy who puts in 2.1.254.21
Thanks Technocrat.
And now kguske:
Has someone begun work on that and would they mind discussing thier implementation thoughts so as I can make plans on how to utilize the functions?
I do know that EVO has (at least partially I think) implemented some of its functionality however, evo is an entirely different beast than most other nukes (and I do not mean that in any disrespectful way as I do admire much of Evo's implementations) and I am looking for a more broadscoped nuke implementation. One I can use with a few flavours which typically most mods written to work on RN can easily be ported to most other versions of nuke without too much rework. At least most of the time anyway. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
kguske
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Sep 02, 2010 10:50 pm |
|
Palbin is working on it, so he would be the best to discuss this. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
duck
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Sep 02, 2010 11:04 pm |
|
kguske wrote: | Palbin is working on it, so he would be the best to discuss this. |
Coolio thanks! |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Palbin
Site Admin
![](modules/Forums/images/avatars/Dilbert/Dilbert_-_Dogbert_King.gif)
Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania
|
Posted:
Fri Sep 03, 2010 7:03 am |
|
I'll try to post something tonight, but it is going to be a busy weekend for me. |
_________________ "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
duck
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Sep 03, 2010 9:08 am |
|
Palbin wrote: | I'll try to post something tonight, but it is going to be a busy weekend for me. |
Yeah it's a busy weekend (possibly week if I go away) for me too so no rush. If you like we can hook up in Msn or TS sometime and chatÉ |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
technocrat
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Sep 03, 2010 9:10 am |
|
duck wrote: | I am aware of the site and was there poking around at the demo. Haven't had a lot of time to look at code or play with all your demo options yet but one thing I did notice (and since you asked about suggestions) is with IP options it translates literially to string and I was thinking a suggestion could be (if you haven't already done this?) is have an option in that portion of the function to set whether to Trim and/or Pad leading 0's? So you could choose to store or display IP's in a consistent manner in case one person puts in 002.001.254.021 vs the guy who puts in 2.1.254.21
Thanks Technocrat. |
Though that is pretty easy to do I am not sure I see how practical that is. I can't really think of a time that I have needed the IP address padded.
I have v3 roughly laid out in my head. Mostly the next version will correct issues of things I am not really happy with. The biggest issue being I am not really happy with the way configs are loaded. I wanted to ensure that configuration was easily extendable, and quick to pickup. The problem is that it constantly has to load everything even when it doesn't apply to what the user is currently using, for example HTMLPurifier.
However the core functionality and calls will stay the same for the most part.
I plan to work on it once I get done doing contract work on the new version of CubeCart. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
duck
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Sep 03, 2010 7:30 pm |
|
technocrat wrote: |
Though that is pretty easy to do I am not sure I see how practical that is. I can't really think of a time that I have needed the IP address padded. |
Not somethng of huge importance or something I felt I had a requiring need for, just an idea while I was playing that struck my head like what if I had a form for entering IP's and someone entered with padded 0's and another didn't. I may prefer to have a consistent storage or display process that either pads or trims. Understandably padding would be less likely desired by most but I could see someone one day saying I'd like my adress blocks to be 3 digits long for some better manipulation purpose or something? But then again it may never be an issue for anyone as I say it was just a thought that popped in my head while playing. Of course it would be as easy to do outside the class as in but I just thought (not having looked into your coding yet ) it might be better as an added configuration option in the class (or inherent property so to speak).
But your next version sounds like it has a lot more important work cut out for you already! ![Wink](modules/Forums/images/smiles/icon_wink.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
djmaze
Subject Matter Expert
![](modules/Forums/images/avatars/524924b24ccc49db6e857.png)
Joined: May 15, 2004
Posts: 727
Location: http://tinyurl.com/5z8dmv
|
Posted:
Sat Sep 04, 2010 9:46 pm |
|
technocrat wrote: | It's still a bit of a work in progress so I would appreciate any feedback. |
It still seems very bloated and can be optimized a lot but, for a first release it is nice! |
_________________ $ mount /dev/spoon /eat/fun auto,overclock 0 1
ERROR: there is no spoon
http://claimedavatar.net/ |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
technocrat
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Sep 07, 2010 9:15 am |
|
I would love any feedback you can give me Maze. I have a few ideas of things to do for the next version but anything you could add would be very helpful.
PS I am keeping my eyes open for POODLE ![Smile](modules/Forums/images/smiles/icon_smile.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
djmaze
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Sep 08, 2010 4:51 pm |
|
Here's something i use in JavaScript for validation in HTML5 forms
Just convert and your email validator looks better
Code:var ub = "25[0-5]|2[0-4]\\d|[01]?\\d\\d?", // IPv4 part, unsigned byte (0-255)
h4 = "[0-9A-Fa-f]{1,4}", // IPv6 part, hex
dp = "[a-z0-9](?:[a-z0-9-]*[a-z0-9])?", // domain part
loc = "[a-z0-9!#$%&'*+/=?^_`{|}~-]+", // e-mail local-part part
local = loc+"(?:\\."+loc+")*", // e-mail local-part
domain = "(?:"+dp+"\\.)+"+dp,
IPv4 = "(?:(?:"+ub+")\\.){3}"+ub,
IPv6 = "\\["+[
"(?:(?:"+h4+":){7}(?:"+h4+"|:))",
"(?:(?:"+h4+":){6}(?::"+h4+"|"+IPv4+"|:))",
"(?:(?:"+h4+":){5}(?:(?:(?::"+h4+"){1,2})|:"+IPv4+"|:))",
"(?:(?:"+h4+":){4}(?:(?:(?::"+h4+"){1,3})|(?:(?::"+h4+")?:"+IPv4+")|:))",
"(?:(?:"+h4+":){3}(?:(?:(?::"+h4+"){1,4})|(?:(?::"+h4+"){0,2}:"+IPv4+")|:))",
"(?:(?:"+h4+":){2}(?:(?:(?::"+h4+"){1,5})|(?:(?::"+h4+"){0,3}:"+IPv4+")|:))",
"(?:(?:"+h4+":){1}(?:(?:(?::"+h4+"){1,6})|(?:(?::"+h4+"){0,4}:"+IPv4+")|:))",
"(?::(?:(?:(?::"+h4+"){1,7})|(?:(?::"+h4+"){0,5}:"+IPv4+")|:))"
].join("|")+"\\]",
host = "("+domain+"|"+IPv4+"|"+IPv6+")",
re_domain= new RegExp(domain),
re_email = new RegExp('^(("[\\w\\s-]+")('+local+')?|'+local+')@'+host+'$',"i"),
re_ipv4 = new RegExp(IPv4),
re_ipv6 = new RegExp(IPv6),
re_url = new RegExp("^([a-z]+)://"+host+"(:[0-9]+)?(/[^\\x00-\\x1F#?]+)?(\\?[^\\x00-\\x1F#]+)?(#[^\\x00-\\x1F]+)?$");
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|