CVS edit link for minorOffense

I have a few modules to submit to CVS. All of these modules are already written and are in production in one way or another. I work for the University of Ottawa as well as my own company. These modules are maintained by me for either institution. But I think they'd be useful to a lot more people so I figure I would put them on Drupal.org

Here's the list of modules I would like to add:

HSTS (HTTP Strict Transport Security) - hsts
Enables the HSTS header info in responses from your Drupal site to allow Strict Transport Security compliant clients to take advantage of the added security.

Webform Sync
Synchronizes the submissions of a webform with all the translations of a given webform. Depends on Webform 3.x

i18n Rules - i18n_rules
Adds Rules integration for the i18n module. You can trigger events and such when a translation exists, doesn't exist or any other i18n related data.

Node Age - node_age
Adds triggers or rules conditions for the "age" of a node. Ex: notify a user if a node has remained unmodified for more than X time. Encourages regular updates to content.

Webform Service - webform_service
Exposes some of the Webform functionality through the Services module.

OG Taxonomy Subgroups - og_taxonomy_subgroups
A module which maintains a hierarchy of Organic Groups using Taxonomy's hierarchy functionality. Similar to Subgroups, but allows for a much larger hierarchy than using Subgroups (which depends on Books). Compared to Subgroups, which can cause errors after a few thousand groups in a hierarchy, Taxonomy Subgroups allows for tens of thousands on the same server configuration.

CommentFileSizeAuthor
#3 hsts.zip2.63 KBminoroffense
#1 modules.zip23.74 KBminoroffense

Comments

minoroffense’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new23.74 KB

Here are the modules I'd like to contribute.

avpaderno’s picture

Status: Needs review » Needs work
Issue tags: +Module review

Hello, and thanks for applying for a CVS account. I am adding the review tags, and some volunteers will review the code, pointing out what it needs to be changed.

As per requirements, the motivation message should be expanded to contain more features of the proposed project. For themes, it should include also a screenshot of the theme, and (when possible) a link to a working demo site using the proposed theme; for modules, it should include also a comparison with the existing solutions.

We review a module/theme per applicant. Upload the module you want to be reviewed.

minoroffense’s picture

Status: Needs review » Needs work
StatusFileSize
new2.63 KB

Ok. I'll go with the HSTS module first. Here's the description for the module:

"HTTP Strict Transport Security (HSTS) is a proposed web security policy mechanism where a web server declares that complying user agents (such as a web browser) are to interact with it using secure connections only (such as HTTPS). The policy is communicated by the server to the user agent via a HTTP response header field named "Strict-Transport-Security". The policy specifies a period of time during which the user agent shall access the server in only secure fashion.[1]" - Wikipedia

This module adds the "Strict-Transport-Security" header with a max-age value and optionally including all subdomains.

You must ensure that your site meets the HSTS requirements before using this module (Essentially, your entire site has to run over HTTPS and have a signed certificate). Otherwise HSTS compliant clients will fail to connect.

You can enable the module and by default the HSTS header data is disabled so you can toggle it from the settings page as you test your configuration.

Browsers that currently support HSTS are Google Chrome and Firefox 4. In Firefox 3.x you can use the NoScript extension to add in support for HSTS.

This module is sponsored and supported by Coldfront Labs.

avpaderno’s picture

Status: Needs work » Needs review

Thank you for your reply.

svendecabooter’s picture

Status: Needs work » Needs review

I'm not sure if anyone is supposed to comment on CVS applications, but here goes anyway:

You could reduce the admin settings code by following these guidelines:

in hsts.module:

	$items['admin/settings/hsts'] = array(
	  'title' => 'HTTP Strict Transport Security Settings',
	  'page callback' => 'drupal_get_form',
	  'page arguments' => array('hsts_admin_settings_form'),
	  'access callback' => 'user_access',
	  'access arguments' => array('administer strict transport security'),
	  'file' => 'hsts.admin.inc',
	);

in hsts.admin.inc:
- remove function hsts_admin_settings_page
- remove function hsts_admin_settings_form_submit
- change line 42 to return system_settings_form($form);

This is a helper function that will automatically call variable_set() for each form element in the form that is passed as argument.
The validation for the checkboxes in the validate function is probably not needed as well, since it can only be 0 or 1 anyway...

I think it's also best practice to use if (variable_get('hsts_enabled', FALSE) == 1) { instead of if (variable_get('hsts_enabled', FALSE)) { .

Furthermore I would suggest you install the Coder module to check your module for coding standards. A quick check indicated that you should change your IDE to use 2 spaces as "tab" character to be standards compliant.

Keep up the good work.
Looking forward to some of those modules you mentioned in your initial post :)

Sven

minoroffense’s picture

Thanks for the tips! I certainly prefer having to type less code than not ;-)

Yeah, I'm using Aptana and I though I had hit all the check boxes I needed to get spaces instead of tabs. Apparently I missed one (there are THREE places needed for that apparently).

So do I make the changes and then resubmit here again for this module? And once that's done, do I create a new request for the other modules or just keep this thread open?

avpaderno’s picture

Status: Needs review » Needs work

I am changing status as per previous review by svendecabooter.

So do I make the changes and then resubmit here again for this module? And once that's done, do I create a new request for the other modules or just keep this thread open?

So far, a CVS application is done just once; when you have your CVS account, you are not limited to create a single project (if something is not changed, but it doesn't seem it will happen soon).

avpaderno’s picture

Status: Needs work » Closed (won't fix)

I am closing this application due to lack of activity.

avpaderno’s picture

Component: Miscellaneous » new project application
Issue summary: View changes