Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> PHP
Author Message
technocrat
Life Cycles Becoming CPU Cycles



Joined: Jul 07, 2005
Posts: 511

PostPosted: Fri May 29, 2009 3:35 pm Reply with quote

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! 
View user's profile Send private message
duck
Involved
Involved



Joined: Jul 03, 2006
Posts: 273

PostPosted: Fri May 29, 2009 4:06 pm Reply with quote

Looks really sweet!
 
View user's profile Send private message
Dawg
RavenNuke(tm) Development Team



Joined: Nov 07, 2003
Posts: 928

PostPosted: Fri May 29, 2009 6:21 pm Reply with quote

That is SUPER Spiffy!

Dawg
 
View user's profile Send private message
duck







PostPosted: Thu Sep 02, 2010 12:39 pm Reply with quote

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
 
technocrat







PostPosted: Thu Sep 02, 2010 12:53 pm Reply with quote

As far as I know they are not.

You know the most current version is:
http://www.phpinputvalidator.org/
 
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6437

PostPosted: Thu Sep 02, 2010 3:19 pm Reply with quote

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!
 
View user's profile Send private message
duck







PostPosted: Thu Sep 02, 2010 5:38 pm Reply with quote

technocrat wrote:
As far as I know they are not.

You know the most current version is:
http://www.phpinputvalidator.org/


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.
 
kguske







PostPosted: Thu Sep 02, 2010 10:50 pm Reply with quote

Palbin is working on it, so he would be the best to discuss this.
 
duck







PostPosted: Thu Sep 02, 2010 11:04 pm Reply with quote

kguske wrote:
Palbin is working on it, so he would be the best to discuss this.


Coolio thanks!
 
Palbin
Site Admin



Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania

PostPosted: Fri Sep 03, 2010 7:03 am Reply with quote

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. 
View user's profile Send private message
duck







PostPosted: Fri Sep 03, 2010 9:08 am Reply with quote

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É
 
technocrat







PostPosted: Fri Sep 03, 2010 9:10 am Reply with quote

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.
 
duck







PostPosted: Fri Sep 03, 2010 7:30 pm Reply with quote

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
 
djmaze
Subject Matter Expert



Joined: May 15, 2004
Posts: 727
Location: http://tinyurl.com/5z8dmv

PostPosted: Sat Sep 04, 2010 9:46 pm Reply with quote

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/ 
View user's profile Send private message Visit poster's website
technocrat







PostPosted: Tue Sep 07, 2010 9:15 am Reply with quote

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
 
djmaze







PostPosted: Wed Sep 08, 2010 4:51 pm Reply with quote

Here's something i use in JavaScript for validation in HTML5 forms
Just convert and your email validator looks better Wink
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]+)?$");
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> PHP

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©