The IP Address Entity module introduces an "IP Address Entity" on your site, supporting the following IP Address Types (ie. bundles):
- Simple IP Address
- Simple IP Address Range (defined via the 'start' and 'end' addresses of the range)
- CIDR IP Subnet (defined via a 'network' address and numeric CIDR mask)
- Network with Netmask (defined via a 'network' address and IP Netmask)
The module provides an admin interface at admin/structure/ipaddrs for the management of these IP Address types (bundles), as well as the definition of new 'custom' types.
It also supports full add/edit/delete/view functionality for individual instances of these IP Address types, and the use of fields to extend IP Address types.
IP Address Ranges can be created as standalone instances, or can also have individual Simple IP addresses created for each address within the range.
Sandbox Link: http://drupal.org/sandbox/jthorson/1171434
Posting this project as an alternative for review (relative to the behemoth of a module included in my first application).
Comments
Comment #1
sreynen commentedThis is still a pretty large project, so I was surprised when I found no issues looking through it.
Comment #2
tim.plunkett+1
Comment #3
dave reidI see a bit of unescaped output:
I highly recommend reviewing the doc pages about Writing secure code. I would also recommend that you or any reviewers test the module with invalid or XSS input.
Comment #4
sreynen commentedNeeds work, right?
Comment #5
jthorson commentedUpdated output sanitization, removed some un-needed functions, and fixed an issue with cidr ranges with 255.255.255.255 broadcast addresses.
Sanitization occurs in the ipaddr_types() and ipaddr_type_name() function calls, so if it looks like it's missing at the output location, one of these was probably called one or two steps up the process chain.
Comment #6
dave reidOh, you're right - that just kinda defies the usual standard of sanitize only on output - I wasn't looking at ipaddr_types() at all.
Comment #7
jthorson commentedNo, you were correct ... it was missing.
But when I went to add it, I realized that I have a few spots where I pass the output of ipaddr_types directly into theme_table ... so rather than adding code to walk through the array and sanitize at every one of those points, I added it at the database call. (Having nothing but a CLI editor at midnight last night, I guess I was feeling a bit lazy.)
My comment was in #5 was just to point this out for any followup review, because I realize it isn't quite as obvious, and might look like I hadn't actually addressed the issue.
Comment #8
jthorson commentedAs this was submitted as an alternative application to http://drupal.org/node/1144198 (posted May 1st), any objections if I up the Priority as per the newly implemented priority rules?
Comment #9
davidhernandezWhat module did you think this module had a duplication conflict with?
Comment #10
sreynen commenteddavidhernandez, I don't see any mention of duplication, so I'm confused about your question.
It looks like the issue in #3 has been addressed and all output is now sanitized. Everything else looks good to me, so marking RTBC.
Comment #11
davidhernandezSorry, I should have been more clear. jthorson posted that on the "second opinion" thread. http://groups.drupal.org/node/157669 . Now that I think about it, was that just an example? I guess I'm think.
Comment #12
jthorson commentedYeah ... I just used my own link as an example ... sorry for the confusion!
Comment #13
rfayYou don't need the module or any include that doesn't contain a class in your files[]
I'd rather see a file header on every file (@file) and a better function header on every function.
Your README.txt is in DOS format I believe (with CR's). Might mess some things up.
Thanks to all for contributing and reviewing. git vetted user role granted.
Please review other applications so maybe we can catch up someday.
Comment #14
jthorson commentedrfay,
Thanks for the feedback ... I didn't realize I hadn't gone back and cleaned up the documentation yet! I'll be sure to do that before promoting the project.
Thanks again!