开发者

Same hash in django and php(bb) forum

I'm trying to integrate phpbb3 into my django website. The problem I have is that I use django.auth for main site authentication. But I want phpbb and django to share the same database or maintain some synchronization between them.

One of the problems is that if I want to update the phpbb database from django I need to hash the password in the same format as phpbb reads them .. but I'm not sure on how to do this? Im no hash/encryption pro...

Any 开发者_开发百科tips on this? Or do you have another idea of how I can design the system?

Thank you!


phpBB3 uses phpass for its password hashing. The phpass page also lists a python port called python-phpass.

Because phpBB3 changes the hash identifier from '$P$' to '$H$', you will have to replace this line:

outp = '$P$'

with this one:

outp = '$H$'


I think you are not along with this task, try look here http://code.google.com/p/django-phpbb/ This is not 100% ready solution, but you can check some code where, also here is some article http://www.gilesthomas.com/?p=63

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜