Bizzarre (un)Secure Logins

Bizzarre (un)Secure Logins

by James Beck -
Number of replies: 6

I'm installing Moodle for the first time on Fedora Core 6 with SSL Logons.
I have noticed that I can log on using BOTH the secure and non secure pages (https://mysite/login and http://mysite/login).  I double-checked that "Use HTTPS for Logins" is enabled, and it is.

Interestingly, when I disable SSL in Apache I can still login using http://mysite/login. ("Use HTTPS for Logins" is still enabled)

Does anybody know what can cause this?

Average of ratings: -
In reply to James Beck

Re: Bizzarre (un)Secure Logins

by Dennis Flynn -
Thanks for noticing that. I don't run apache, so can't help you fix yours, but I just went into my IIS and set the directory security on the login directory to require SSL. I hope this forum is trolled by moodle admins, because this should be documented as a required step to force SSL on the account functions.
In reply to Dennis Flynn

Re: Bizzarre (un)Secure Logins

by James Beck -

I thought that maybe it would work if a moved the login folder out of my html root and pointed the ssl virtual directory to the new location, so in theory no non-https access will be alowed.

I will test this and re-post

In reply to James Beck

Re: Bizzarre (un)Secure Logins

by James Beck -

Okay, i sort of got it i think. I doubt this is the recommended method but here goes.

Created a new folder /var/www/ssl_html and moved the login folder there.

Then i modified my ssl virtual directory to point to this new dir. Moodle then complained about missing config.php etc, so I created links to all the folders and files in the moodle directory.

It worked until i logged out. Of course logout.php is not ssl, so i created a new empty login folder in the non-ssl area and moved logout.php into there.

Works fine!

If anybody knows of a better way, please let me know!

In reply to James Beck

Re: Bizzarre (un)Secure Logins

by John Papaioannou -
I 'm not sure if this is the expected behavior, but I think you should report this issue in the bug tracker so it's fixed "for good". The way it works now doesn't sound right to me.

Jon
In reply to John Papaioannou

Re: Bizzarre (un)Secure Logins

by Dennis Flynn -

Actually (and I'm a noob web admin, so admit I could very well be wrong), thinking about it in retrospect, it seems that it's obviously up to the server admin to have to require SSL on the login directory by some means.  Moodle is doing it's part by directing the login files to an https url, but it can't force the server to not accept anything but an SSL connection on those files; that has to be done by the admin.

Again, I could very well be in the wrong here.  It was easy enough in IIS to require a certificate on the login directory.  I don't know apache, but maybe there's something that could simply be put in an .htaccess file in the login directory to require SSL?

...

just did a quick google search on it, and this site might prove helpful.

In reply to Dennis Flynn

Re: Bizzarre (un)Secure Logins

by John Papaioannou -
You 're probably right, and my ultranoob server admin skills are to blame. blush