summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2009-08-05Multi::IRC: Re-added the !vn commandYorhel1-36/+36
Works as it did before. But maybe it's time to add a small throttle to prevent misuse?
2009-08-05Multi::IRC: Don't listen to unaddressed commands without the ! triggerYorhel1-2/+2
Tiny bug introduced in a recent commit.
2009-08-05Multi::IRC: Allow commands to be called by addressing the botYorhel1-10/+13
And force this for some commands. Calling !die in a channel with multiple bots isn't a good idea, after all...
2009-08-05Multi::IRC: Display edit summary on edit linksYorhel1-3/+9
2009-08-05Multi::IRC: Display board titles in thread linkingYorhel1-2/+19
Nothing beats seeing a: <Multi> [t2.7] Reply to Alias: added Japanese title Posted in db, u:retardsrox, u:nacchi, v:Natsu, Semi, Shoujo, v:Dal-eu Jajang-ga By applehq @ http://beta.vndb.org/t2.7
2009-08-04Started on Multi::IRC rewriteYorhel1-254/+246
Most of the functionality of the old IRC bot should be present again, with notifications and the !vn command being the only exceptions. I'll reimplement those later. The configuration has changed a little: - 'user' variable renamed to 'nick' - 'channel' renamed to 'channels' (it's an arrayref, after all) - the 'masters' variable now uses IRC masks rather than nicks This new version also has three user levels rather than two: regular users, OPs in the first channel, and 'masters'. This way #vndb OPs can get control over some useful functions as well. The 'master' functions are far too powerful and as such should only be used by the person operating the bot.
2009-08-01Don't try to DELETE FROM vnlists in dbUserDel()Yorhel1-1/+0
The vnlists table has been removed in an earlier update. Though I don't think I've explicitely removed it from an update script. For those who still have this table, check commit 9a07126464f4ca05f33e7375883ada66abe7dcf4 - it has some changes not present in any of the update scripts but which are done on the main (vndb.org & beta) databases.
2009-07-31Use bytea data type to store session tokensYorhel1-10/+8
To be consistent with users.passwd - hashes are stored in binary. All conversion from/to hex is done in the DB layer.
2009-07-31Fetch hex hashes from dbUserGet() and do comparison in hexYorhel2-12/+9
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 betaYorhel3-32/+115
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 timestamp3dB2-4/+11
-- Updated SQL files to reflect column type change. -- Subroutine dbSessionAdd rewritten to accept an expiration timestap as an optional third argument.
2009-07-29Altered the way sessions are handled in some cases3dB2-0/+2
-- Deleting a user now deletes all sessions too. -- Changing a user password now deletes all stored sessions for that user.
2009-07-29Cleanup of Util/Auth.pm3dB1-13/+7
2009-07-29Rewrote Multi::MaintenanceYorhel1-99/+99
Everything now uses Async SQL access, and doesn't rely on POE::Component::Cron anymore. I removed a few maintenance functions that weren't needed. Warning for unkanime is already done by Multi::Anime, and integrity checking should really be done in PgSQL. The tag<->vn cache is now also regenerated daily rather than hourly.
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 tweaks3dB2-12/+13
This commit is tested to work.
2009-07-28Modified DB libraries and user handlers dealing with passwords to work with ↵3dB2-8/+10
new auth system. -- Modified all database insertion and edit subroutines to be able to work with the new 'salt' column. -- Modified all subroutines dealing with password manipulation to use authPreparePass to encrypt passwords and generate salts.
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-27Applied small adjustments and reorganized DB library code.3dB2-44/+33
-- Removed "ON UPDATE" from sessions.uid column FK -- Fixed dbSessionCheck to work as described -- Merged DB/Sessions.pm into DB/Users.pm
2009-07-24Checkin of auth rewrite progress.3dB1-0/+43
Added a new DB library for handling sessions. New update SQL file for database changes. Added a line to the global config file to set a global salt. It is separate from the cookie_key because it is much more important that it not be changed.
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-23Remove session aliases in shutdown handlerYorhel5-0/+5
This isn't really necessary when shutting down the entire process, but it is for the individual session to shut down. This will make it possible to load/unload/reload Multi modules on demand without restarting the process.
2009-07-23Implemented relgraph notify from PgSQL triggerYorhel4-22/+6
This finishes the new relation graph generator, as it'll now regenerate graphs as soon as is needed. This obsletes the VNDB::Util::Misc::vnCacheUpdate() function, this functionality is provided by triggers within PostgreSQL. The update_vncache(0) procedure is now significantly slower due to the trigger on the vn table. It'd be a good idea to rewrite this procedure by using triggers and conditional updates, to drastically lower the number of rows that need to be updated.
2009-07-19Rewrote Multi::RGYorhel1-129/+88
It should be a bit more efficient and non-blocking. Also a lot less verbose with logging.
2009-07-19Multi::Core: Correctly set the pg_enable_utf8 flagYorhel1-1/+1
Before this edit, the options part of the DSN was incorrect, resulting in DBD::Pg ignoring the pg_enable_utf8 flag.
2009-07-19Notify Multi::Image via PostgreSQL for new screenshotsYorhel2-3/+2
This finished the rewrite of Multi::Image and everything surrounding it.
2009-07-19Converted and renamed screenshots.status (int) to processed (bool)Yorhel2-4/+4
There were only two states, processed and unprocessed, so simply using a boolean column with correct naming is more clarifying.
2009-07-18Notify Multi::Image for new cover images via LISTEN/NOTIFYYorhel2-2/+3
Yay! Another weird shared-memory-command optimized away. And the image resizer reacts a lot faster now. Noticably, even.
2009-07-18Rewrote Multi::ImageYorhel1-164/+61
Decided to remove the Image::MetaData::JPEG dependency as well, as the Image::Magick::Thumbnail function removes a lot of unecessary information, profiles and other data as well.
2009-07-18Use PostgreSQL's LISTEN/NOTIFY to notify Multi::Anime for new animeYorhel2-2/+5
The notify is called from a trigger function, which is called on any UPDATE or INSERT INTO query of which the lastfetch column is NULL. This guarantees that anime info in the DB will always be updated, no matter how its inserted.
2009-07-18Rewrote Multi::AnimeYorhel1-162/+104
No shared memory! Asynchronous SQL! yay!
2009-07-18Automatically insert rows into anime table for new vn_anime.aid itemsYorhel1-18/+5
This is a lot less error-prone than doing it from Perl. <3 PostgreSQL
2009-07-18Modified definition of the anime tableYorhel1-4/+4
Removed most NOT NULL constraints, and converted lastfetch to a timestamp data type. The site has been updated to handle this, but Multi::Anime won't work.
2009-07-17Rewrote Multi::Sitemap and included tag pagesYorhel1-75/+73
This should've taken me less than an hour, but unfortunately it took a bit longer because I found a rather hard-to-fix bug in PoCo::Pg. Be sure to update to the latest POE::Component::Pg. Also, this change removes the DateTime dependency. Its functionality could be replaced with the strftime() found in POSIX (which every Perl has)
2009-07-17Multi::Core: Handle SIGTERM and SIGINTYorhel1-13/+30
These events will be signalled to Multi's modules as a 'shutdown' signal.
2009-07-16Made a start on the Multi-rewriteYorhel1-101/+37
Started on multi.pl and Multi::Core, the main differences: - Uses POE::Component::Pg now (get it from http://g.blicky.net/poco-pg.git/) - Doesn't use shared memory anymore - No 'commands' anymore, every session has to handle its own events (communication goes either through POE itself, or the PostgreSQL DB) - No weird Cron stuff anymore All other Multi modules will have to be updated/rewritten to reflect these changes. None of them will work at the moment.
2009-07-09More intuitive ordering of the copy and posts tabsYorhel1-10/+12
Related #vndb discussion: <ImmLff> Yorhel: some minor interface suggestions - in release entry swap the order of "copy" and "edit" buttons, so edit would be near "rxxx" button as it was earlier; move "posts" tab near the "discussions" tab(probably between discussions and history), so discussion related tabs would be near each other <ImmLff> at least it looks logical to me and definitely won't harm <Yorhel> oh, I haven't really put any thought into the order of the tabs <Yorhel> so your suggestions sounds good :) <Yorhel> although, I'll place the posts tab after wishlist, to be consistent with the other DB entries
2009-07-09Order wishlist by priority by default, and use title as secondary sort columnYorhel1-3/+3
2009-07-09Don't allow bots to index the users' posts browserYorhel1-1/+1
2009-07-08Keep track of users who requested tagsYorhel2-6/+14
2009-07-07Posts browser on user pages (/u+/posts)Yorhel4-9/+94
2009-07-07Display thread count in user menuYorhel3-3/+5
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).
2009-07-07Hide threads targeted at users from the main pageYorhel2-2/+4
2009-07-05Tag exclude filters on VN searchYorhel2-8/+18
2009-07-05Added spoiler options for tag filters on VN searchYorhel3-6/+18
2009-07-05Updated VN screenshot uploader to handle multilanguage releasesYorhel1-1/+1