FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Plugins and Code Hacks » Email Obfuscation Plugin (Obfuscates email addresses imported by mail gateway)
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Email Obfuscation Plugin [message #168498] Sun, 12 May 2013 07:15 Go to next message
cpreston is currently offline  cpreston   United States
Messages: 160
Registered: July 2012
Location: Oceanside
Karma: 6
Senior Member
When importing 10s of thousands of emails into a public forum, we thought it really important to obfuscate email addresses so that people who emailed a mailing list didn't get their email address displayed to the world. That's what this plugin does.

First it identifies email addresses using a pretty good regular expression. Then, each email address is obfuscated by replacing @ to " $RAN1 at $RAN2" and '.' to " $RAN1 dot $RAN2 " where $RAN1 and $RAN2 are a fixed number of random alphanumeric characters. The length of the alphanumeric characters can be specified in the plugin.

This does not modify the email addresses in the database, It just obfuscates them when they are published. When unpublished, the email id's would appear in their normal state.

This makes the obfuscation completely random to make it harder to scrape, but it allows a human to read it just fine if they want to take the time. Make sense?

Test it and let me know what you think?
Re: Email Obfuscation Plugin [message #168499 is a reply to message #168498] Sun, 12 May 2013 08:09 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Great idea! Some sugestions:

1. The code to rebuild themes can be removed (not required)
2. Remove reference to 'Fudla'
3. The regex doesn't catch e-mail addresses in posts (or maybe not all of them).

PS: Can we include this plugin with the next release?

Best regards.
Frank
Re: Email Obfuscation Plugin [message #168502 is a reply to message #168499] Sun, 12 May 2013 16:27 Go to previous messageGo to next message
cpreston is currently offline  cpreston   United States
Messages: 160
Registered: July 2012
Location: Oceanside
Karma: 6
Senior Member
Well it's certainly supposed to catch e-mail addresses in posts. Wink

Can you give me some examples of addresses it doesn't catch?

We can release this plugin however you'd like.

[Updated on: Sun, 12 May 2013 16:28]

Report message to a moderator

Re: Email Obfuscation Plugin [message #168544 is a reply to message #168502] Sun, 19 May 2013 06:27 Go to previous messageGo to next message
cpreston is currently offline  cpreston   United States
Messages: 160
Registered: July 2012
Location: Oceanside
Karma: 6
Senior Member
Alright, figured out why it wasn't matching emails in posts. It was only searching for the "@" sign, not the encoded version of it that's stored in posts (@). I've got one more fix and it should be ready for the world. Wink
Re: Email Obfuscation Plugin [message #168551 is a reply to message #168544] Tue, 21 May 2013 15:24 Go to previous messageGo to next message
cpreston is currently offline  cpreston   United States
Messages: 160
Registered: July 2012
Location: Oceanside
Karma: 6
Senior Member
Here is the 1.0.1 version that I will be using in production. We removed the lines you specified and changed the regex to find email addresses that were changed to @

I also came up with the idea of having the length of the random string be random and implemented that, and selected it by default. Admins can use that value, no random string, or a number from 1-3.

[Updated on: Tue, 21 May 2013 15:25]

Report message to a moderator

Re: Email Obfuscation Plugin [message #168553 is a reply to message #168551] Tue, 21 May 2013 16:32 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Looks a lot better! But it can be further improved by skipping post/edit pages. Try to edit a message with an e-mail address to see why this would be important.
Re: Email Obfuscation Plugin [message #168554 is a reply to message #168553] Tue, 21 May 2013 16:46 Go to previous messageGo to next message
cpreston is currently offline  cpreston   United States
Messages: 160
Registered: July 2012
Location: Oceanside
Karma: 6
Senior Member
That makes sense.

I have no idea how to exclude post/edit pages, though.
Re: Email Obfuscation Plugin [message #168555 is a reply to message #168554] Wed, 22 May 2013 06:52 Go to previous messageGo to next message
cpreston is currently offline  cpreston   United States
Messages: 160
Registered: July 2012
Location: Oceanside
Karma: 6
Senior Member
My guys figured it out.

This new version does not run when a post is being created or edited.

Enjoy!

Frank,

Publish it as it pleases you. Wink

Now I'm off to develop a Joomla 3.1 version of the FUDla plugin.

[Updated on: Wed, 22 May 2013 07:00]

Report message to a moderator

Re: Email Obfuscation Plugin [message #168559 is a reply to message #168555] Thu, 23 May 2013 16:21 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Thanks. Committed at http://fudforum.svn.sourceforge.net/fudforum/?rev=5611&view=rev
Re: Email Obfuscation Plugin [message #168560 is a reply to message #168559] Thu, 23 May 2013 16:29 Go to previous messageGo to next message
cpreston is currently offline  cpreston   United States
Messages: 160
Registered: July 2012
Location: Oceanside
Karma: 6
Senior Member
I feel so proud. My baby flies free. Wink
Re: Email Obfuscation Plugin [message #168873 is a reply to message #168560] Wed, 31 July 2013 21:33 Go to previous messageGo to next message
cpreston is currently offline  cpreston   United States
Messages: 160
Registered: July 2012
Location: Oceanside
Karma: 6
Senior Member
Frank,

I have a question about this plugin. I created a Wiki entry for the plugin, but I only see it if I am logged into the wiki. (The page is here: http://cvs.prohost.org/index.php/Email_Obfuscate.plugin) If I am logged in, I see it under the list of plugins: http://cvs.prohost.org/index.php/Category:Plugins) If I am not logged in, I do not see it there. I can see it if I directly access it (even if I'm not logged in), but I don't see it in the plugins list, nor can I search for it if I'm not logged in.

What's up with that?

[Updated on: Thu, 01 August 2013 02:35]

Report message to a moderator

Re: Email Obfuscation Plugin [message #168955 is a reply to message #168873] Sat, 10 August 2013 17:18 Go to previous message
cpreston is currently offline  cpreston   United States
Messages: 160
Registered: July 2012
Location: Oceanside
Karma: 6
Senior Member
I googled the problem and here's what I found:
http://stackoverflow.com/questions/10099328/articles-only-show-up-when-user s-logged-in
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Adding References: header to mailing list emails
Next Topic: SEO url mods question
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Dec 03 17:06:54 GMT 2024

Total time taken to generate the page: 0.03581 seconds