Git Product home page Git Product logo

wp_django_auth's People

Contributors

cristiroma avatar mrmicjam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

wp_django_auth's Issues

Please fill-in README

Please fill-in the README with the packages versions this library was supposed to work with.

Thanks and congratulations for this nice work

Code does not work on WP 3.4.2

The failing code is

db = MySQLdb.connect(host=MYSQL_HOST, user=MYSQL_USER, passwd=MYSQL_PASSWD, db=MYSQL_DB)
cursor = db.cursor()   
cursor.execute("select option_value from wp_options where option_name = 'logged_in_salt'")
log_in_salt = cursor.fetchone()[0]

because the query no longer returns anything on this WordPress version - the value with 'logged_in_salt' cannot be found inside wp_options table.

If I hard-code log_in_salt and auth_key with those from wp-config.php all tests are passing.

I think that you need to consider support for multiple WP versions. I will try to provide a patch for this, including processing of wp-includes/version.php where $wp_version holds the actual WP version.

Error:

(sandbox)cristi:wp_django_auth cristiroma$ python wp_django_auth.py 
Traceback (most recent call last):
  File "wp_django_auth.py", line 354, in <module>
    test()
  File "wp_django_auth.py", line 315, in test
    cookie_name, cookie = generate_cookie(user_id)
  File "wp_django_auth.py", line 92, in wrap
    return func(*args, **kwargs)
  File "wp_django_auth.py", line 195, in generate_cookie
    log_in_salt = cursor.fetchone()[0]
TypeError: 'NoneType' object has no attribute '__getitem__'

Packages:
Python 2.7.3
PHP 5.4.9 (cli) (built: Dec 17 2012 16:31:03)
WordPress 3.4.2

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.