Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#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@…, 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.

Change History (15)

comment:1 Changed 4 years ago by saroyanm

  • Blocking 2843, 2844 added

comment:2 follow-up: Changed 4 years ago 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 4 years ago 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 4 years ago by oleksandr

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

comment:5 Changed 4 years ago by oleksandr

  • Status changed from new to reviewing

comment:6 Changed 4 years ago by oleksandr

  • Description modified (diff)

comment:7 Changed 4 years ago 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 4 years ago 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 4 years ago by oleksandr

  • Owner changed from oleksandr to matze

comment:10 follow-up: Changed 4 years ago 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 4 years ago 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 4 years ago 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 4 years ago by matze

  • Owner changed from matze to oleksandr

comment:14 Changed 4 years ago by oleksandr

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

comment:15 Changed 4 years ago by saroyanm

  • Blocking 2874 added
Note: See TracTickets for help on using tickets.