mistermarco/WMD — Issue #67: require valid-user disappears from .htaccess when mappings are added or removed
Author: mistermarco
Created: 2012-02-02 01:53:24+00:00
State: open
Labels: Bug

On a new install, a default .htaccess file is copied over to sites/default/.htaccess. This contains the line require valid-user. However, the database does not have the webauth_require_valid_user variable set to 1 (it's not created at install).

Later, if the .htaccess file is re-written because of a new mapping, the default for webauth_require_valid_user is 0, which means that require valid-user is not written out.

To complicate things, when viewing the Authorizations tab, the form uses 1 as the default value for the checkbox if webauth_require_valid_user is not set. That's OK if we want that to be the default, but it makes it hard for an admin to figure out why logging in doesn't work (since the form tells it that require_valid_user is set).

I think the fix is to make sure that webauth_require_valid_user is set to 1 at install time to match the value that's in the .htaccess file at install time.