Extension talk:Email Authorization

About this board

When reporting an error, please be sure to include version information for MediaWiki and all relevant extensions as well as configuration information. Also, please turn on debug logging as described at Manual:How to debug#Logging and include the relevant portions of the debug log.

Support for PostgreSQL?

3
AndrewDBate (talkcontribs)

The Email Authorization extension does not currently support PostgreSQL.

Both of the *.sql files in the sql directory contain the ENGINE=InnoDB clause, which is specific to MySQL/MariaDB. In modern versions of MySQL and MariaDB, InnoDB is the default, so this clause is probably not required anymore (but perhaps it needs to be included for older versions of those systems for reasons I am not aware of).

The SQL files also use backticks, which are not supported by PostreSQL, as well as unsupported datatype names.

To get the extension working with PostgreSQL, the SQL needs to be changed as follows:

The contents of file EmailAuth.sql which is currently:

CREATE TABLE emailrequest (
     email TEXT NOT NULL PRIMARY KEY,
     request BYTEA NOT NULL
 );
 

needs to be edited to:

CREATE TABLE emailauth (
     email BYTEA NOT NULL PRIMARY KEY
 );
 

The contents of file EmailRequest.sql which is currently:

CREATE TABLE `emailrequest` (
     `email` tinyblob NOT NULL,
     `request` blob NOT NULL,
     PRIMARY KEY (`email`(50))
 ) ENGINE=InnoDB DEFAULT CHARSET=binary;
 

needs to be edited to:

CREATE TABLE emailauth (
     email TEXT NOT NULL PRIMARY KEY
 );
 

I have used the TEXT datatype for email addresses as that seems the most appropriate as far as I know.

A proper fix to the plugin would add mysql and postgres subdirectories to the sql directory of the extension with the appropriate SQL for either system, as has been done in the OpenIDConnect extension.

AndrewDBate (talkcontribs)

Since I have not had a reply from anyone, I have gone ahead and opened an issue for this:

T293933

Marksomnian (talkcontribs)

Appears to be supported as of version 2.0.

Reply to "Support for PostgreSQL?"

Case sensitive email addresses

4
131.180.32.6 (talkcontribs)

Hello! I am using Email Authorization in conjunction with SimpleSAMLphp as the authorization and authentication of PluggableAuth.

A problem I am encountering is that the EmailAttribute returned by the authentication has capitalization. Combinations like A.B.Lastname@domain.com for example, or A.lastName@domain.com can all occur. But Email Authorization appears to i) be case sensitive and ii) trim and lowercase emails before adding them (as of v1.5).


Would it be possible to have Email Authorization not be case sensitive? Because I believe that email addresses are not, if I am not mistaken? Although maybe I am approaching this in the wrong way, maybe instead the SimpleSAMLphp extension should get rid of the capitalization in the attribute that is returned to it. Does that make more sense?

131.180.32.6 (talkcontribs)

I should have added. This is on MediaWiki 1.35.0, SimpleSamlPHP 4.5.2 , PluggableAuth 5.7 and Email Authorization 1.5.

Cindy.cicalese (talkcontribs)

Thank you for reporting this. I will try to take a look at it soon and will report back here once I have done so.

Cmthom (talkcontribs)

Is there a way to make email searches not case sensitive in 1.31.10? specifically worried about Special:PasswordReset

Reply to "Case sensitive email addresses"

Need to require an e-mail to make an account and only allow from a certain domain

2
Rtg20 (talkcontribs)

Hi, I think I am almost there - installed the extension no problem and added the domain to Special:EmailAuthorizationConfig


Only thing is it doesn't work - I attempted to make an account with a different e-mail and it still worked.


I must be missing something...please help.


thanks!

Cindy.cicalese (talkcontribs)

I'm going to need more information. What software versions are you using? How are they configured? Have you enabled logging? If so, what do the logs say? Can you give more detail about the email that worked but should not have?

Reply to "Need to require an e-mail to make an account and only allow from a certain domain"

An example in the documentaiton, please?

2
أحمد (talkcontribs)

Hallo, @Cindy.cicalese

Can I ask for a more detailed example on how to use this for logging in?

I used Special:EmailAuthorizationConfig to authorise a domain, but entering a user name whose email address is in that domain and clicking "log in with PluggableAuth" doesn't work. I get message with the meaning "provided credentials are not associated with a user in this wiki".

I also tried entering the email address in the username, to the same effect.

Cindy.cicalese (talkcontribs)

That sounds like an error in the configuration of your authentication plugin. I'm guessing you'll get the same error even if you disable EmailAuthorization. But, I will need more information to be sure. Please include version information for MediaWiki and all relevant extensions as well as configuration information. Also, please turn on debug logging as described at Manual:How to debug#Logging and include the relevant portions of the debug log. Look for lines that begin with [PluggableAuth] and [<name of authentication plugin>] (e.g. [SimpleSAMLphp]).

Reply to "An example in the documentaiton, please?"

No page Special:ConfigEmailAuthorization

5
أحمد (talkcontribs)

I installed EmailAuthorization 1.3 (6c290e3) on MW 1.30.0 (5.6.38-0+deb8u1) with PluggableAuth 5.2 (2528a75), and ran update.php.

Now, even though I have the proper permission and can see Special:EmailAuthorizationApprove, I "get page doesn't exist", upon requesting Special:ConfigEmailAuthorization

Cindy.cicalese (talkcontribs)

Ah, it looks like that alias was removed. Does Special:Configure_Email_Authorization work for you? If so, I'll need to update the documentation.

Cindy.cicalese (talkcontribs)

Special:EmailAuthorizationConfig should also work.

Cindy.cicalese (talkcontribs)

The change happened in version 1.2. The documentation is now fixed. Thank you for reporting this.

أحمد (talkcontribs)

Yes! That works. Thanks, Cindy.

Reply to "No page Special:ConfigEmailAuthorization"
There are no older topics