summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2015-01-28Apply bbSubstLinks to database description fieldsYorhel4-0/+4
2015-01-28bbSubstLinks: Replace staff IDs with namesYorhel1-4/+7
2015-01-28Merge branch 'staff' into masterYorhel9-15/+88
Conflicts: lib/VNDB/DB/VN.pm lib/VNDB/Handler/VNPage.pm
2015-01-27staff: Fix various parts to recognize the new staff databasemorkt4-6/+7
2015-01-25staff: Fix adding/editing staff with >10 aliassesYorhel1-1/+1
Another bug related to query limits. It's become a common theme now.
2015-01-25staff: Add staff edit permission + alias layoutingmorkt2-9/+14
2015-01-17DB: No need to use double-%% in like queriesYorhel3-3/+3
2015-01-17staff: Fix search to ignore spaces in Japanese namesmorkt1-1/+6
2015-01-17Handler::VNPage: Conditionally disable warnings for smartmatchmorkt1-1/+1
Only recent perl versions need it, on older versions the 'no warnings' line would cause an error.
2015-01-17Fix bug with language icon not being displayed for release in user listmorkt1-6/+5
This happened when a release was linked to multiple visual novel entries, the language icon would show on one VN but not on the other.
2015-01-17Fix placing of add/edit tabs on VN pages when tags are hiddenmorkt1-0/+1
2015-01-16staff: More form verification + support more chars for VN seiyuu linkingmorkt1-4/+12
2015-01-15Double the limit of number of traits to a characterYorhel1-1/+1
As per t2520.119 and t2520.120.
2015-01-12staff: Remove some remnants of the staff imagesYorhel2-2/+1
2015-01-12staff: Make Multi::IRC aware of the staff databaseYorhel1-5/+10
2015-01-12staff: Stronger verification of form datamorkt2-21/+29
2015-01-12bbSubstLinks: Increase titles to fetch to 50 + tweak matching patternmorkt1-8/+9
Patch from https://vndb.org/t2520.116
2015-01-04staff: Add some link fields and guidelinesmorkt2-13/+28
2015-01-03staff: Various JS fixesmorkt1-1/+1
2015-01-02staff: Don't allow empty staff revisionsYorhel2-5/+8
2015-01-02staff: Fix warning of comparison against undefYorhel1-1/+1
2015-01-02staff: Fix duplicate listing of seiyuu for chars with multiple releasesYorhel1-3/+3
This unfortunately means I had to remove the order-by-character-role feature. It's possible to get that back, but it's not quite as trivial.
2015-01-02staff: Fix deleting of staff + use JSON to pass data + minor fixesmorkt7-47/+101
2014-12-29staff: Some bug fixes and styling improvementsmorkt2-29/+57
2014-12-29staff: Don't use inline script to pass seiyuu import datamorkt1-14/+8
Same reasoning as 0d191b5cd8c79eef3cef63c40ded96506a40382a
2014-12-28staff: Import cast from other VN + some styling + more improvementsmorkt6-65/+99
2014-12-28More progress on the staff + cast DBmorkt7-94/+193
2014-12-24Further progress on the staff databasemorkt5-75/+57
- Moves staff<->vn linking form to the main VN edit form - Fixes a bug with linking staff aliases to VNs - Adds staff changes to the VN revisions - And some misc. improvements
2014-12-23bbSubstLinks: Fix minor parsing issuemorkt1-2/+2
Patch from https://vndb.org/t5564.18
2014-12-22DB: Merge name/title fetching in main fetching functionsYorhel7-45/+15
And call bbSubstLinks() from Handler::Discussions rather than DB::Discussions - it's not a transformation that the DB layer should do, IMO.
2014-12-22bbcode: Replace [vcpgi][0-9]+ links with a [url] tagmorkt6-6/+109
Patch from https://vndb.org/t5564.13
2014-12-22Initial implementation of a staff/seiyuu databasemorkt10-22/+669
2014-12-02Completely drop l_vnn column from VN infoYorhel2-5/+4
Used to link to a visual-novels.net review or something. Links have been hidden and dead since ages. No need to keep the column around.
2014-12-02Handler::VNEdit: Fix 500 when editing VN without screenshotsYorhel1-1/+1
Broken in 44b11883da3a7e6f1138984ceeba162e0f90dc35
2014-12-01Replace some 'onclick' attributes with JS-generated eventsYorhel3-8/+8
I think this was the last piece of inline JS.
2014-12-01Don't use inline script to pass screenshot sizes in VN editYorhel1-7/+6
Same reasoning as 0d191b5cd8c79eef3cef63c40ded96506a40382a
2014-12-01Don't use inline script tag to pass pref_code to JSYorhel4-14/+7
This also simplifies the code a bit, as the value of the preference data was never used so doesn't need to be included now. Primary reason for this change is to work towards disabling inline JS with a CSP header. There's still more stuff to fix before the CSP header can be applied, though.
2014-10-21Use TUWF's reqBaseURI() instead of $self->{uri} on site linksYorhel5-11/+16
TUWF properly detects HTTPS and includes this in the returned URL, so this change ensures that all URLs adopt properly to HTTP and HTTPS.
2014-10-21Disable warning about switch statementYorhel1-1/+2
I really want to rewrite that code to not use the very unperlish switch statement, but the code is rather... complex and hairy. :(
2014-10-20Fix tabindex on edit summaryYorhel1-1/+1
Per https://vndb.org/t5864
2014-10-16Fix tabindex on the date selectorYorhel1-1/+1
2014-10-16Completely get rid of the old charedit perm flagYorhel5-15/+10
2014-10-16Add a positive tabindex to all generated form elementsYorhel1-12/+16
This should result in a more natural tabbing order, skipping over any links around the forms.
2014-10-16Set httponly flag on auth cookieYorhel1-1/+1
2014-10-16Hash session tokens with SHA-1 when storing in DBYorhel2-23/+25
This ensures that, if an attacker evers gets read access to the database, he will not be able to compromise any accounts. SHA-1 suffices here, because the data being hashed is a random 20 byte string. The search space is so damn large that you can't sanely brute force it, nor are rainbow tables any use at that scale. They're not salted. The password reset tokens are also hashed in the database and do include salt, but I've no idea why we did that.
2014-10-15Multi::API: Fix login with the new password format changesYorhel1-5/+19
2014-10-15Multi::API: Fix crash on failed loginYorhel1-2/+2
I broke this when changing the column type of login_throttle.timeout.
2014-10-15Use scrypt for new password hashesYorhel2-9/+29
I increased the N parameter to approximate about 500ms to generate the hash. This is quite a paranoid setting for a website, but login attempts are throttled so there's not much of a DoS factor. (Alright, password changing feature isn't throttled so the DoS factor still exists. But really, there's some pages with longer page generation times anyway.) I did lower the size of the salt a bit (Crypt::ScryptKDF uses 256 bits by default), because 64 bits of randomness should have low enough chance of collision with only ~100k users (even with a million users, seriously).
2014-10-15Auth: Use a proper CSPRNG for generating salt and tokensYorhel1-6/+10
2014-10-15SQL: Merge users.(passwd|salt) in one column + document valuesYorhel3-41/+32
It doesn't make a whole lot to separate the hashed password and the salt from each other, you need both to do anything with them, and from the database perspective they're both completely opaque strings only usable for direct comparison with other hashed strings. This change is mostly as preparation for switching to a proper key derivation function (sha256 isn't...) and to add support for longer and/or binary salt. Because the passwd field now needs to be interpreted in Perl, it's being passed around as a binary string rather than a hex-encoded value. API login is broken in this commit. I'll get to that.