Opened on 07/31/2015 at 04:41:47 PM

Closed on 08/20/2015 at 02:20:09 PM

Last modified on 10/01/2015 at 10:25:46 AM

#2846 closed change (fixed)

Service for processing Microsoft Edge announcement subscription

Reported by: saroyanm Assignee: oleksandr
Priority: Unknown Milestone:
Module: Sitescripts Keywords:
Cc: sebastian, kzar, matze, saroyanm Blocked By:
Blocking: #2843, #2844, #2874 Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/29323033/

Description (last modified by oleksandr)

Background

With #2844 we are creating a new landing page where users can subscribe to Adblock Plus for Microsoft Edge announcement, for that we need Service that will process users emails similar way we have done in #2234.

What to change

Implement a WSGI app served by the multiplexer providing following two controllers:

/submitEmail

This controller handles POST requests with following form fields:

emailAn email address to receive the notification about the Adblock Browser iOS launch
langThe language code of the landing page shown after verifying the email address

If the email address is invalid a response with status 400 and the text "Please enter a valid email address." should be returned. We don't need full email validation here, but should merely make sure that the value is in the form of local@domain where the local part must be ASCII-only. Also no newlines must occur in the value, after stripping leading and trailing whitespaces.

Otherwise, a verification email should be sent to that email address. The sender of the verification email should be info@adblockplus.org, its subjects should be "Please confirm your Adblock Browser notification" and following text should be used in the email body:

Hello,

Thanks for signing up to get notified of Adblock Plus for Microsoft Edge!
Click the link below to verify your email address.

<verification URL>

You can simply ignore this email if you didn't sign up.

If at any point you decide that you no longer want to be notified, email
info@adblockplus.org and we'll remove you from the notification list.


The Adblock Plus Team

Eyeo GmbH
Im Klapperhof 7-23
50670 Cologne, Germany

E-mail: info@adblockplus.org
Web: https://eyeo.com | https://adblockplus.org

VAT-ID: DE279292414
District Court Cologne: HRB 73508
Managing Directors: Wladimir Palant & Till Faida

The placeholder <verification URL> must be replaced with a link to /verifyEmail which is described below. Once the verification email has been sent, a response with the text "A confirmation email has been sent. Please check your email and click the confirmation link." should be returned.

/verifyEmail

This controller handles the links in the verification emails sent by /submitEmail. If the verification URL is valid, the email address should be stored, and the user should be redirected to the corresponding landing page (#2335) in the given language. Otherwise, a response with status 403 and a corresponding error message should be returned. We should reuse the verifyEmail controller we already have for iOS email collection.

Attachments (0)

Change History (15)

comment:1 Changed on 07/31/2015 at 04:45:22 PM by saroyanm

  • Blocking 2843, 2844 added

comment:2 follow-up: Changed on 08/07/2015 at 10:15:48 AM by oleksandr

Just for reference, I'd be happy to do it, since I have already done the first iteration https://codereview.adblockplus.org/29323033/. Please assign the ticket to me, if you're ok with me doing it.

comment:3 in reply to: ↑ 2 Changed on 08/07/2015 at 10:26:23 AM by saroyanm

  • Cc sebastian added

Replying to oleksandr:

Just for reference, I'd be happy to do it, since I have already done the first iteration https://codereview.adblockplus.org/29323033/. Please assign the ticket to me, if you're ok with me doing it.

I do think make sense if @Sebastian will mark it ready beforehand, some question needs to be discussed I think like:
Should we use "/submitEmail" while it's already processing the email for the Adblock Browser subscription.

After that I think you can do changes according to the updated description and submit codereview, should be fine I think.

comment:4 Changed on 08/13/2015 at 04:12:37 AM by oleksandr

  • Owner set to oleksandr
  • Ready set
  • Review URL(s) modified (diff)

comment:5 Changed on 08/13/2015 at 04:14:22 AM by oleksandr

  • Status changed from new to reviewing

comment:6 Changed on 08/18/2015 at 09:19:25 AM by oleksandr

  • Description modified (diff)

comment:7 Changed on 08/19/2015 at 04:02:18 PM by oleksandr

  • Cc kzar matze added

The patchset is ready to be pushed.
@matze
It requires a change to the sitescripts settings when pushed like here: https://codereview.adblockplus.org/29323033/diff/29324385/.sitescripts.example

Specifically:

renaming:

[submit_email] 
filename -> adblockbrowser_filename
verification_email -> adblockbrowser_verification_email

adding:

[submit_email]
edge_filename=%(root)s/logs/edge_email_addresses.txt
edge_verification_email_template=submit_email/template/edge_verification.mail

changing the value of:

[submit_email]
successful_verification_redirect_location=https://adblockplus.org/{lang}/verific
     ation-success

comment:8 Changed on 08/19/2015 at 05:20:19 PM by matze

I would like to push the sitescripts change-set myself (retaining the original author, of course), in order to make sure both changes are applied simultaneously. If that's fine with you just assign this ticket to me. If you see an issue with that approach, I need to be notified before you push the changes; in order to pause the automagic updates of the servers' repository clone.

comment:9 Changed on 08/19/2015 at 07:45:51 PM by oleksandr

  • Owner changed from oleksandr to matze

comment:10 follow-up: Changed on 08/20/2015 at 12:34:51 AM by matze

  • Cc saroyanm added

@saroyanm, @kzar: The successful_verification_redirect_location does not exist. Is the URL wrong or does the target just not exist yet?

comment:11 in reply to: ↑ 10 Changed on 08/20/2015 at 07:07:00 AM by saroyanm

Replying to matze:

@saroyanm, @kzar: The successful_verification_redirect_location does not exist. Is the URL wrong or does the target just not exist yet?

Just doesn't exist yet #2847.

comment:12 Changed on 08/20/2015 at 01:43:59 PM by matze

The change-set has been pushed and the configuration has been updated:

$ diff sitescripts.ini /etc/sitescripts
239,241c239,243
< filename=%(root)s/files/adblockbrowser_email_addresses.txt
< verification_email_template=submit_email/template/verification.mail
< successful_verification_redirect_location=https://adblockplus.org/{lang}/adblock-browser/verification-success
---
> adblockbrowser_filename=%(root)s/files/adblockbrowser_email_addresses.txt
> adblockbrowser_verification_email_template=submit_email/template/verification.mail
> edge_filename=%(root)s/logs/edge_email_addresses.txt
> edge_verification_email_template=submit_email/template/edge_verification.mail
> successful_verification_redirect_location=https://adblockplus.org/{lang}/verification-success

comment:13 Changed on 08/20/2015 at 01:44:15 PM by matze

  • Owner changed from matze to oleksandr

comment:14 Changed on 08/20/2015 at 02:20:09 PM by oleksandr

  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:15 Changed on 10/01/2015 at 10:25:46 AM by saroyanm

  • Blocking 2874 added

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from oleksandr.
 
Note: See TracTickets for help on using tickets.