Commit Graph

27 Commits

Author SHA1 Message Date
Bharat Mediratta
76f688a070 Clean up poor english. Use the latest recaptcha info from their website. Fixes ticket #470. 2009-06-27 16:41:05 -07:00
Bharat Mediratta
bfca0c7903 Refactor the install/upgrade code to be more flexible.
Add xxx_installer::upgrade($version) method so that upgrade stanzas
are separate from install stanzas.  In the old code, to do an upgrade
meant that you had to re-evolve everything from the initial install
because we'd step through each version's changes.  But what we really
want is for the initial install to start off in the perfect initial
state, and the upgrades to do the work behind the scenes.  So now the
install() function gets things set up properly the first time, and the
upgrade() function does any work to catch you up to the latest code.
See gallery_installer.php for a good example.
2009-06-23 12:00:49 -07:00
unostar
753ce3e025 Add "custom_translations" instruction to captcha form builder to add possibility to localize and customize form. 2009-06-17 01:26:47 -07:00
unostar
1081eee201 Added "cutom_translations" instruction to Recaptcha to localize & cutomize recaptcha message. 2009-06-15 05:54:45 -07:00
Andy Staudacher
5f7dfc272e Remove double quotes from module.info (theme.info) attribute values.
(actually, we did that before: Now removing HTML element attributes since they were delimited by single quotes because PHP's ini parser can't
deal with double-quotes in values.)

Background:
Requiring all l10n messages a) to be well-formed HTML and b) to use double-quotes as HTML element attributes, since the l10n server side
validation normalizes all attribute delimiters to double-quotes). See ticket #254.
2009-06-09 21:05:33 -07:00
Bharat Mediratta
6feb640b73 fix typo: "the the" -> "the" (thanks VENCO!) 2009-06-06 12:24:08 -07:00
Bharat Mediratta
3f96830ef1 Properly localize domain url in recaptcha explanation. 2009-06-06 12:22:20 -07:00
Tim Almdal
9f51395151 fix preamble so file structure test passes 2009-06-02 12:31:27 -07:00
Bharat Mediratta
f039598410 Move recaptcha widget into a view for clarity. Also, wrap it in a
setTimeout() call so that on subsequent reloads (which happen when you
fail to validate the form) it has time to rebuild the DOM before
calling the JS which tries to inject the Recaptcha HTML.

Fixes ticket #327
2009-06-01 23:58:49 -07:00
andyst
02a840c84c Merge branch 'master' of git@github.com:gallery/gallery3 2009-06-01 23:45:37 -07:00
Andy
d0845aadc6 Workaround for parse_ini_file issue: There's no way to escape a double-quote in a value that's read with
parse_ini_file. Using single quotes instead, even if that's not the best style in English.
2009-06-01 23:08:13 -07:00
Bharat Mediratta
43abcd9386 Security pass over all controller code. Mostly adding CSRF checking
and verifying user permissions, but there are several above-the-bar
changes:

1) Server add is now only available to admins.  This is a hard
   requirement because we have to limit server access (eg:
   server_add::children) to a user subset and the current permission
   model doesn't include that.  Easiest fix is to restrict to admins.
   Got rid of the server_add permission.

2) We now know check permissions at every level, which means in
   controllers AND in helpers.  This "belt and suspenders" approach will
   give us defense in depth in case we overlook it in one area.

3) We now do CSRF checking in every controller method that changes the
   code, in addition to the Forge auto-check.  Again, defense in depth
   and it makes scanning the code for security much simpler.

4) Moved Simple_Uploader_Controller::convert_filename_to_title to
   item:convert_filename_to_title

5) Fixed a bug in sending notification emails.

6) Fixed the Organize code to verify that you only have access to your
   own tasks.  In general, added permission checks to organize which had
   pretty much no validation code.

I did my best to verify every feature that I touched.
2009-06-01 22:40:22 -07:00
Bharat Mediratta
79a05adb9d Clear the site status message on deactivate, not on uninstall. 2009-05-31 22:33:28 -07:00
Bharat Mediratta
7aed923908 Restructure the module lifecycle.
Install: <module>_installer::install() is called, any necessary tables
are created.

Activate: <module>_installer::activate() is called.  Module
controllers are routable, helpers are accessible, etc.  The module is
in use.

Deactivate: <module>_installer::deactivate() is called.  Module code
is not accessible or routable.  Module is *not* in use, but its tables
are still around.

Uninstall: <module>_installer::uninstall() is called.  Module is
completely removed from the database.

Admin > Modules will install and activate modules, but will only
deactivate (will NOT uninstall modules).
2009-05-26 05:28:59 +00:00
Bharat Mediratta
5495037a3d Gee it's May already. Update copyright to 2009. 2009-05-13 20:04:58 +00:00
Bharat Mediratta
768418ea49 Remove unused orig_public_key from the form, it wasn't actually doing anything (and was causing an error). 2009-03-16 08:55:36 +00:00
Bharat Mediratta
6a8daaef5e Don't try to show the recaptcha if we don't have a public key 2009-02-05 19:21:29 +00:00
Tim Almdal
a3aef69317 Correct indentation 2009-01-30 13:03:56 +00:00
Bharat Mediratta
97e4125956 Add module name to log::success() calls 2009-01-28 09:45:52 +00:00
Bharat Mediratta
6220db47b3 Simplify the recaptcha admin page. It's not guaranteed to verify your
recaptcha private key properly anymore, but it's more intuitive to
configure in the admin UI.
2009-01-28 08:15:56 +00:00
Bharat Mediratta
a30c28b5fc Make the comment -> recaptcha binding happen via an event dispatch as
opposed to a direct call.
2009-01-27 08:21:54 +00:00
Tim Almdal
af56018f7c Forgot to add the Form_Recaptcha class 2009-01-26 16:16:00 +00:00
Tim Almdal
bfb5c42124 Adding Recaptcha to the comment module. Recaptcha integration consists of a Form_Recaptcha class derived from Form_Input that can be added to any class that requires Recaptcha verfication. 2009-01-26 16:12:57 +00:00
Tim Almdal
09e7f63d73 Removed all the complex code to locate the forms. Now the admin
screen just has the public and private keys and if the public key is
provided a recaptcha box shows up which is used to validate the public
private key pair.
2009-01-25 17:34:27 +00:00
Tim Almdal
4bb2c53c8f Added the ability to identify and present the defined forms to the
adminstrator. The forms are presented as a checklist, I would have
preferred a selection list, but Forge doesn't have one.  The generated
html to contain the recaptcha challenge is defined as <ul> as that was
the only way to force itto line up.
2009-01-25 16:35:25 +00:00
Tim Almdal
cbff78daa8 Supply a form id on all forms. This id can be used by modules other
than the originating module to provide additional functionality to the form.
2009-01-24 17:26:47 +00:00
Tim Almdal
3438bf7b3d The adminstration portion of the recaptcha module. I haven't figured out how to integrate it with the other module forms. 2009-01-23 17:05:20 +00:00