Merge lp:~julian-edwards/maas/clickjacking-bug-1298784 into lp:~maas-committers/maas/trunk

Proposed by Julian Edwards
Status: Merged
Approved by: Julian Edwards
Approved revision: no longer in the source branch.
Merged at revision: 2299
Proposed branch: lp:~julian-edwards/maas/clickjacking-bug-1298784
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 11 lines (+1/-0)
1 file modified
src/maas/settings.py (+1/-0)
To merge this branch: bzr merge lp:~julian-edwards/maas/clickjacking-bug-1298784
Reviewer Review Type Date Requested Status
Jeroen T. Vermeulen (community) Approve
Review via email: mp+217879@code.launchpad.net

Commit message

Enable Django's clickjacking middleware.

Description of the change

Not sure if it warrants a unit test but I verified that the header is present after enabling this.

To post a comment you must log in.
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

Testing is a grey area with these things, but I think you're OK. My feeling is that code which merely states configuration only needs to be tested for:

1. Running at all. I'm sure that's covered already.
2. Stating things correctly, if stating them incorrectly is plausible. Not here though.
3. Producing the right interaction within the scope of the product.

For #3 I would say the interaction is completely between Django and the browser. The only thing you do here is tell Django that it should happen.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/maas/settings.py'
--- src/maas/settings.py 2014-02-14 12:12:28 +0000
+++ src/maas/settings.py 2014-05-01 06:10:35 +0000
@@ -249,6 +249,7 @@
249 'maasserver.middleware.ExternalComponentsMiddleware',249 'maasserver.middleware.ExternalComponentsMiddleware',
250 'metadataserver.middleware.MetadataErrorsMiddleware',250 'metadataserver.middleware.MetadataErrorsMiddleware',
251 'django.middleware.transaction.TransactionMiddleware',251 'django.middleware.transaction.TransactionMiddleware',
252 'django.middleware.clickjacking.XFrameOptionsMiddleware',
252 'django.middleware.csrf.CsrfViewMiddleware',253 'django.middleware.csrf.CsrfViewMiddleware',
253 'maasserver.middleware.ExceptionLoggerMiddleware',254 'maasserver.middleware.ExceptionLoggerMiddleware',
254 'django.contrib.auth.middleware.AuthenticationMiddleware',255 'django.contrib.auth.middleware.AuthenticationMiddleware',