Commit Graph

863 Commits

Author SHA1 Message Date
fiatjaf 9b2482379e shorten the request-id we're logging. 2018-01-09 20:06:31 +00:00
fiatjaf 72839c57dc add tests for special fields being excluded from emails when forms are submitted through ajax. 2018-01-09 15:43:24 +00:00
fiatjaf 835798b09f fix pt-PT and pt-BR incongruencies. 2017-12-13 16:47:18 +00:00
fiatjaf ea5576f107 add tr language. 2017-11-23 01:27:09 +00:00
fiatjaf 3eb3163492 add da, cs, id, pt-BR and pt-PT and sort languages alphabetically. 2017-11-22 01:25:38 +00:00
Rohit Datta 8402a222e2
update readme to use flask cli 2017-10-20 15:01:23 -05:00
Rohit Datta 88e4c037e6
update manage.py to use flask cli 2017-10-20 14:56:44 -05:00
Rohit Datta f27e921d5a
update old import statements 2017-10-20 00:05:24 -05:00
Rohit Datta 2827c47fce
add basics for adding billing hub 2017-10-19 23:47:12 -05:00
Rohit Datta f486f6eb88 Merge pull request #161 from rohitdatta/90-percent-warning
90 percent warning
2017-10-19 22:11:29 -05:00
Rohit Datta cd1ee24905
update text email version 2017-10-17 14:17:59 -05:00
Rohit Datta 7a3a62e24e
add a warning at 90% 2017-10-16 14:30:22 -05:00
fiatjaf 24f3900c71 add Thai (and reformat language list). 2017-09-28 18:11:45 +00:00
Rohit Datta 39229c7215
add bulgarian 2017-09-09 19:21:13 -05:00
Giovanni T. Parra 2ee839949d Merge pull request #157 from fiatjaf/less-heavy-queries
only delete old submissions 20% of the times.
2017-08-17 09:35:35 -03:00
fiatjaf a3794050c8 change the env/setting variable name. 2017-08-17 03:22:28 +00:00
fiatjaf b650249753 do a count(*) check after the random condition. 2017-08-17 03:17:21 +00:00
fiatjaf 44885a5d42 only delete old submissions 20% of the times.
the query that deletes past submissions (over the ARCHIVE limit)
is currently running on all form submissions for all forms.

this PR introduces basic randomness so it runs only on 20% of the
submissions.

if the form has 1000 stored submissions that query is very heavy,
if the form has less than 1000 it is totally unnecessary (while
still being possibly heavy).
2017-08-17 02:06:16 +00:00
fiatjaf e1dce499c1 add swedish language. 2017-08-08 01:19:37 +00:00
fiatjaf 67f3ef25c8 add traditional and simplified chinese. 2017-07-31 21:34:29 +00:00
fiatjaf cc5cd9a584 lower and strip emails on password reset. 2017-07-27 20:15:17 +00:00
fiatjaf ba62a0d1c3 added hungarian language. 2017-07-27 18:55:26 +00:00
fiatjaf 2f676f2aff fallback for browsers without sessionStorage.
most notably iOS Safari when run in Incognito Mode.
2017-07-27 18:46:08 +00:00
fiatjaf aa581cd523 fix japanese language code: jp -> ja. 2017-07-21 12:15:31 +00:00
fiatjaf db1f19d781 added dutch language. 2017-07-18 14:53:48 +00:00
fiatjaf 67b9ed6592 add japanese language. 2017-07-17 13:14:11 +00:00
fiatjaf a99d7fac27 add polish language. 2017-07-17 12:36:12 +00:00
fiatjaf c07ea8c96d Show an error when get_temp_hostname retrieves an invalid value.
Prevents these kinds of errors:

```
ERROR in app: Exception on /redacted@email [POST]
Traceback (most recent call last):
  File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1614, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1517, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/app/.heroku/python/lib/python2.7/site-packages/flask_cors/decorator.py", line 128, in wrapped_function
    resp = make_response(f(*args, **kwargs))
  File "/app/formspree/forms/helpers.py", line 35, in decorator
    return f(*args, **kwargs)
  File "/app/formspree/forms/views.py", line 59, in send
    host, referrer = get_temp_hostname(received_data['_host_nonce'])
ValueError: too many values to unpack
```

https://papertrailapp.com/groups/3007404/events?focus=819220498843115549&q=program%3Aapp%2Fweb.2&selected=819220498843115549
2017-07-05 14:35:43 +00:00
fiatjaf c2cd12f768 reduce logging output. 2017-07-05 13:56:42 +00:00
fiatjaf 4150c4cf0c quick fix for bug with forms without _language. 2017-06-19 13:35:56 +00:00
fiatjaf cebbbbbe87 pass the _language code to recaptcha too.
Solves https://formspree.zendesk.com/agent/tickets/50, and,
although reCAPTCHA supposedly does his own magic to detect the
submitters preferred language, it makes sense, since the form
owner has chosen to show a localized version of the page, to
also force reCAPTCHA to be on that version.
2017-06-19 12:50:59 +00:00
fiatjaf ddd988e818 don't call |length on None value. 2017-06-16 12:27:32 +00:00
fiatjaf 524fa25e9a add italian and german translations. 2017-06-14 15:32:23 +00:00
fiatjaf 6611c9663e allow Authorization header on CORS.
The guy from https://formspree.zendesk.com/agent/tickets/27
somehow needed this because of the way his Angular app was
making requests. There's probably no harm in allowing it.
2017-06-14 15:04:58 +00:00
fiatjaf 87277c2271 slovakian, russian and ukrainian translations. 2017-06-13 12:58:53 +00:00
Cole Krumbholz c0dadea7dc adding GA event for confirmation 2017-06-12 02:54:51 -04:00
Cole Krumbholz 3f18a56f37 removing ga key from source 2017-06-12 02:24:32 -04:00
Cole Krumbholz 772ddf34e3 adding google optimize 2017-06-12 02:21:06 -04:00
Giovanni T. Parra 2b989d5f53 Merge pull request #150 from fiatjaf/ignore-ending-slashes
ignore ending slashes for forms created in the dashboard.
2017-06-09 09:05:46 -03:00
fiatjaf b02a22c199 do not store modified versions of host.
in the previous two commits I introduced these changes
and now I'm removing them because they doesn't serve
any purpose, just introduce unnecessary complexity.
2017-06-08 22:11:45 +00:00
fiatjaf 4965eb349f simplifies the way www prefixes are ignored. 2017-06-08 22:05:54 +00:00
fiatjaf 7175f754e3 ignore ending slashes
for forms created in the dashboard, we can easily and safely
ignore ending slashes while comparing the host to which they
are tied and the host that has actually submitted them.
2017-06-08 21:52:28 +00:00
Rohit Datta eafbbb4882
add french recaptcha support 2017-05-30 16:01:49 +02:00
Rohit Datta 490a83342e
disable contact form for non-Gold users 2017-05-28 13:12:56 +02:00
Rohit Datta 6f66a73cdf Merge pull request #149 from rohitdatta/captcha-internationalization
Captcha internationalization
2017-05-26 23:39:47 +02:00
Rohit Datta ee660fc9cf Merge pull request #147 from rohitdatta/enhanced-wallet-support
Enhanced wallet support
2017-05-26 22:36:23 +02:00
Rohit Datta d8fdff517b
add pt as supported lang on homepage 2017-05-26 22:32:20 +02:00
Rohit Datta 9e08aa49e0 Merge pull request #1 from fiatjaf/rohitdatta-captcha-internationalization
adding portuguese.
2017-05-26 22:29:55 +02:00
fiatjaf 817b2ce2ab portuguese version of captcha page. 2017-05-26 20:23:53 +00:00
Rohit Datta c496b110da
add wording about _language on front page 2017-05-26 19:36:37 +02:00