GithubHelp home page GithubHelp logo

praekelt / django-atlas Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 2.0 247.61 MB

Geolocation models, data and tools using GeoDjango

License: BSD 3-Clause "New" or "Revised" License

Python 91.54% JavaScript 4.26% HTML 0.94% Shell 3.26%

django-atlas's Introduction

Praekelt Engineering Ways of Working

These docs are automatically built & available at http://praekelt-prime-directive.rtfd.org/.

Build these docs locally with:

$ virtualenv ve
$ source ve/bin/activate
(ve)$ pip install -r requirements.pip
(ve)$ cd docs
(ve)$ make html

Open index.html in docs/_build/html.

django-atlas's People

Contributors

hedleyroos avatar rizziepit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

miltontony wd5

django-atlas's Issues

Django vulnerability

Just a heads-up, your code may be vulnerable to the Django vulnerability CVE-2014-0472 fixed just recently because it seems to allow user-supplied input to reverse() in atlas/views.py:

redirect_to = form.cleaned_data['origin']
if redirect_to != '/':
    redirect_to = reverse(redirect_to)

You should update your Django and/or advise users to do so ASAP. Django security advisory: https://www.djangoproject.com/weblog/2014/apr/21/security/

Found via GitHub code search.

set-location redirect breaks

https://github.com/praekelt/django-atlas/blob/develop/atlas/views.py#L46
origin = getattr(resolve(request.get_full_path()), 'url_name', None)
This breaks for parametrized urls since this call returns the view-name without the parameter. So the following url url(r'^campaigns/(?P<slug>[\w-]+)/$', 'some.view.function', name='campaign_detail'), the value of origin will always be campaing_detail and the subsequent reverse() will fail. https://github.com/praekelt/django-atlas/blob/develop/atlas/views.py#L69

Suggested fix would be to simply use request.get_full_path() and remove the reversing of the url.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.