Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/staticgenerator checks request is anonymous #48

Conversation

paulproteus
Copy link
Contributor

Until now, it has been possible that django-staticgenerator would save a version of pages such as /search/ that contain a basically-random user's personal information (username and "recommended searches"). Actually, given the current search.html template, probably just username.

Still, that's terrible. This modules our use of the StaticGeneratorMiddleware to avoid that problem.

(Thanks to jesstess for reporting the issue.)


def get_user_ip(request):
# return request.META['REMOTE_ADDR']
if request.META['REMOTE_ADDR'] == '127.0.0.1':
return "98.140.110.121"
else:
return request.META['REMOTE_ADDR']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lol whitespace changes lol

aldeka added a commit that referenced this pull request Jul 13, 2012
…s-request-is-anonymous

Feature/staticgenerator checks request is anonymous
@aldeka aldeka merged commit 3a47ea1 into openhatch:master Jul 13, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants