mirror of
https://github.com/neocities/neocities.git
synced 2025-08-04 16:51:36 +02:00
Mandate email validation for free accounts. Be sure to set EMAIL_VALIDATION_CUTOFF_DATE before deploy
This commit is contained in:
parent
cef1611003
commit
a2a6a40438
19 changed files with 178 additions and 27 deletions
2
app.rb
2
app.rb
|
@ -29,6 +29,8 @@ before do
|
|||
content_type :json
|
||||
elsif request.path.match /^\/webhooks\//
|
||||
# Skips the CSRF check for stripe web hooks
|
||||
elsif email_not_validated? && !(request.path =~ /^\/site\/.+\/confirm_email|^\/settings\/change_email|^\/signout|^\/welcome|^\/plan/)
|
||||
redirect "/site/#{current_site.username}/confirm_email"
|
||||
else
|
||||
content_type :html, 'charset' => 'utf-8'
|
||||
redirect '/' if request.post? && !csrf_safe?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue