Commit Graph

15 Commits

Author SHA1 Message Date
0883ac6423 Fix whitespace and indentation, per pep8 2019-01-17 20:47:43 +01:00
87237f6536 Tabs, meet your new overlords: spaces
In a quest to reach pep8, use spaces to indent rather than tabs.
2019-01-17 15:35:39 +01:00
b2771a29bb Allow framing google.com on account signup page
This is used for the recaptcha. Also enable this for oauth signups,
previously missed.
2018-12-29 11:49:57 +01:00
d36ea4a985 Enable setting of security http headers
The following security policy headers are set:

X-XSS-Protection: 1; mode=block -- always set

X-Frame-Options: DENY is set for all pages except for the documentation
  pages, primarily because pgadmin4 loads them in an iframe which would
  break.

Content-Security-Policy: <x>-src
  Is set to allow the default of self only, then allowing scripts for
  google analytics and fonts for google fonts. Images are allowed from everywhere.
  frame-ancestors 'none' is set by the same rules as X-Frame-Options

This also adds a decorator for @script_sources to have a single view
allow extra sources, and this is used for recaptcha. A generic decorator
is also made for other types of exclusions, though we don't have any at
this point.

If the setting SECURITY_POLICY_REPORT_ONLY is set to True then the policy
will be report-only and not enforced (for testing), otherwise enforcing
mode is enabled.

The setting SECURITY_POLICY_REPORT_URI sets where to send security
policy reports, if any.
2018-12-21 21:46:28 +01:00
0c6099e236 Remove unused imports 2018-06-29 13:40:04 +02:00
a0b1c9242f Fix embarassing typo
That's what happens when a commit is not properly tested
2016-05-24 21:42:31 +02:00
66750c136a Allow logins in /admin/ as well
Required for our custom admin pages.
2016-05-24 21:39:22 +02:00
7fc34e9eaf Replace login_required decorator with a validating one
This one will validate that the url is under /accounts/, which is
the only part we are going to be excluding from caching once we
move the website to https-only.
2016-05-24 21:14:34 +02:00
753d20545a Remove SSL optional tag 2016-05-24 21:13:00 +02:00
048a17ae4b Don't redirect dynamic CSS from https to http
This can break things (d'uh).

Do this by introducing a new decorator, @ssl_optional. When this is
present, no SSL redirection will happen, regardless of whether the
access comes in over http or https.

This decorator overrides @ssl_required, but for redability's sake,
never use both at the same time.
2014-01-02 12:00:32 +01:00
557c44fab5 Update @ssl_required decorator to play nice with other decorators
The decorator now retains all attributes of the original view and adds a
new 'view.ssl_required = True' attribute.
2012-11-11 16:07:05 +01:00
df378de32c Fix formatting of s-maxage 2010-06-09 16:50:44 +02:00
056466a21c Implement decorators to control proxy caching (for the reverse
proxy), and enable it for the mirror tracking parts
2010-01-12 19:52:32 +01:00
5f619889d7 Make https redirection work again.
Add a way to skip https redirection, so we can still run it locally,
and mark a couple of forms as requiring https.
2009-09-16 15:46:17 +02:00
90b758c247 A first very basic import.
Contains basic functionality, and an import of most of the static content
from the old site.

There is still plenty more to do...
2009-09-14 14:39:25 +02:00