Coder Social home page Coder Social logo

todo's People

Contributors

ivenn avatar nuzhnov avatar va11ter avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

todo's Issues

Wrong response in case we are trying to access to host/confirm/some_token url

Steps to reproduce:

  1. Open browser. Be shoure that you are logged out.
  2. Go to http://host:port/confirm/some_token

Excpected result:

You should see a massage: "The confirmation link us invalid or expired"

Actual result:

you are see a massage: "
User was already confirmed, just login!
Please log in to access this page.
"

It's happenes by two reasons:

  1. Wrong use of confirm_token method.
    We are use this method by the next way:
    try:
        username = confirm_token(token)
    except:
        flash('The confirmation link us invalid or expired')

But confirm token return False, in case a token isn't valid.
we have username = False
2. But by unknow reason the next statesment with username = False, returns admin for us

    user = User.query.filter_by(username=username).first()

admin alredy confirmed and we see "User was already confirmed," message.

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.