summaryrefslogtreecommitdiff
path: root/lib/VNDB/Util/Auth.pm
AgeCommit message (Collapse)AuthorFilesLines
2009-08-08Improved handling of the timestamp columns in anime and session tablesYorhel1-1/+1
Anything fetched from the DB to Perl should be converted to a UNIX timestamp, and everything that goes from Perl to the DB should be converted from a UNIX timestamp to a timestamptz data type. Also, when creating a session, don't rely on the fact that the expiration default happens to be the same as the cookie expiration time calculated in Perl. It's cleaner to calculate the date at one place and then use that everywhere else.
2009-07-31Fetch hex hashes from dbUserGet() and do comparison in hexYorhel1-9/+7
For consistency, it's best to do everything related to hashes in hexadecimal notation in Perl.
2009-07-31Added encode_utf8() on $salt and $pass in _authEncryptPass()Yorhel1-3/+5
This forces $salt and $pass to be 'downgraded' to byte strings in case we are given unicode strings (i.e. when fetched from database or YAWF). This, in turn, prevents global_salt from 'upgrading', which allows binary data to be used for this string.
2009-07-30Util::Auth: check cookie for sanity and delete incorrect cookiesYorhel1-5/+14
This fixes a 500 error when the cookie was longer than 40 bytes but the characters after the 40th byte aren't a number. (i.e. the cookies of the previous auth system) This will also purge the cookie from the user's browser when dbSessionCheck() returns false. (There's no sense in keeping it in such a case)
2009-07-30Merge branch 'auth' of git://3decibels.net/vndb into betaYorhel1-23/+63
Conflicts: util/dump.sql util/updates/update_2.6.sql Also updated ChangeLog and made some tiny style changes.
2009-07-29Changed sessions.expiration column to timestamp3dB1-1/+1
-- Updated SQL files to reflect column type change. -- Subroutine dbSessionAdd rewritten to accept an expiration timestap as an optional third argument.
2009-07-29Cleanup of Util/Auth.pm3dB1-13/+7
2009-07-28Rewrote cookie experation string generation to use POSIX::strftime3dB1-5/+3
2009-07-28Removed Crypt::Lite dependency3dB1-11/+8
-- Changed the way cookie data is handled and removed the need for Crypt::Lite -- Removed "cookie_key" configuration setting for Crypt::Lite
2009-07-28Multiple bugfixes to authorization system & sql tweaks3dB1-11/+12
This commit is tested to work.
2009-07-28Replaced _authGenerateSalt with a better one-liner.3dB1-21/+7
-- Removed _authGenerateSalt in favor of a one-liner in authPreparePassword. -- Fixed a self-inflicted "WTF" mistake in authInit caused by a stray paste.
2009-07-27Committing initial modification of authorization module.3dB1-21/+74
-- Changed the way cookies are handled to a database-backed system -- Changed the password hashing algorithm used -- Introduced a dual-salt method for increasing password encryption strength
2009-07-23Created subroutine to genrate password salts3dB1-0/+11
This is more of a test of the new git environment than anything else.
2009-07-07Display thread count in user menuYorhel1-1/+1
This adds a small performance penalty, but should make it a lot easier for people to notice that someone is asking for his/her attention. Ideally, this count would be the number of *unread* *posts*, rather than *total* number of *threads*, but we don't store read the state (yet).
2008-12-09Code cleanup: removed leading spaces and combined ↵Yorhel1-2/+2
DB/{Votes,VNList,WishList}.pm into ULists.pm
2008-10-31A few small fixes, working logout function and added a nonworking user menu ↵Yorhel1-1/+1
and login form
2008-10-31Added some authentication and user functionsYorhel1-0/+96
2008-10-26Removing all files we're not going to use with the rewriteYorhel1-133/+0
...this is basically everything we're going to rewrite
2008-07-29- Further polished the rlist featureyorhel1-0/+2
- Re-added old VN list, delete-only and with a warning - Small code cleanup git-svn-id: svn://vndb.org/vndb@75 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
2008-06-07Removed encryption key for cookies from SVN, and added some documentation ↵yorhel1-1/+1
(written by apple) git-svn-id: svn://vndb.org/vndb@23 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
2008-04-13W00t, VNDB on SVN!yorhel1-0/+131
git-svn-id: svn://vndb.org/vndb@1 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b