summaryrefslogtreecommitdiff
path: root/lib/VNDB/Util
AgeCommit message (Collapse)AuthorFilesLines
2015-10-01VNEdit: Give error on duplicate alias + improved msg on id/page errorYorhel1-1/+2
2015-09-20formValidate: Created templates for gtin and editsum fieldsYorhel1-2/+7
2015-09-20Use the new reqQuery() + update usage of reqPath() for TUWF 1.0Yorhel2-3/+2
2015-09-07Handler::Discussions: Remove formcode from search formYorhel1-3/+6
It's not verified and only uglifies the URLs.
2015-09-07Implement discussion board search functionYorhel1-1/+2
Inspired by wakaranai's implementation at https://github.com/morkt/vndb/commit/b852c87ad145fdaaa09c79b6378dd819b46f7e87 This version is different in a number of aspects: - Separate search functions for title search and fulltext post search. Perhaps not the most convenient option, but the downside of a combined search is that if the query matches the threads' title, then all of the posts in that thread will show up in the results. This didn't seem very useful. - Sorting is based purely on post date. Rank-based sort is slow without a separate caching column, and in my opinion not all that useful. Implementation differences: - Integrated in the existing DB::Discussions functions, so less code to maintain and more code reuse. - No separate caching column for the tsvector, a functional index is used instead. This is a bit slower (index results need to be re-checked against the actual messages, hence the slowdown), but has the advantage of smaller database dumps and less complexity in updating the cache. Things to fix or look at: - Highlighting of the search query in message contents. - Allow or-style query matching
2015-07-22Util::BrowseHTML: Fix XSS in "order by" link URLsYorhel1-2/+2
Reported by dim0k at https://www.xssposed.org/incidents/74523/
2015-07-19Remove reliance on Referer header for the login formYorhel1-2/+5
2015-07-19Remove the MSIE browser check & warning pageYorhel1-47/+1
It's a relic of the past. IE 6 & 7 are very rarely used nowadays, and people still using it will quickly realize why things don't quite work - they'll be used to it.
2015-05-13Changed layour of staff pagesYorhel1-2/+2
Not entirely sure if this is an improvement, but it's slightly more consistent with other layouts (combination of user page, release page and character page), and leaves more room for the credit/cast listings.
2015-05-13Add staff statistic to main menuYorhel1-1/+1
2015-02-02Add filters to staff browsers + minor layout fix on staff pagesmorkt1-1/+2
2015-01-28bbSubstLinks: Replace staff IDs with namesYorhel1-4/+7
2015-01-28Merge branch 'staff' into masterYorhel1-1/+71
Conflicts: lib/VNDB/DB/VN.pm lib/VNDB/Handler/VNPage.pm
2015-01-27staff: Fix various parts to recognize the new staff databasemorkt1-2/+2
2015-01-25staff: Add staff edit permission + alias layoutingmorkt1-1/+3
2015-01-12bbSubstLinks: Increase titles to fetch to 50 + tweak matching patternmorkt1-8/+9
Patch from https://vndb.org/t2520.116
2015-01-02staff: Fix deleting of staff + use JSON to pass data + minor fixesmorkt1-0/+1
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 functionsYorhel1-3/+3
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] tagmorkt1-1/+70
Patch from https://vndb.org/t5564.13
2014-12-22Initial implementation of a staff/seiyuu databasemorkt2-4/+7
2014-12-01Don't use inline script tag to pass pref_code to JSYorhel1-11/+4
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 linksYorhel2-2/+3
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-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 flagYorhel2-8/+5
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 DBYorhel1-19/+21
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-15Use scrypt for new password hashesYorhel1-3/+27
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 valuesYorhel1-26/+17
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.
2014-10-13SQL: Use enum to represent platformsYorhel1-1/+1
I believe I didn't do this conversion earlier (back when I converted the language types) because PostgreSQL didn't support dynamically adding new values to an existing enum back then, and modifying an enum was a huge pain. Recent versions do support this, so there's no reason to keep it as a string. ...I just felt like adding some churn to the code base.
2014-08-29API: Make sure to honor the new login throttleYorhel2-23/+2
2014-08-29Strengthen formcode for non-logged-in visitors + CSRF protect login formYorhel3-16/+26
formcode is strengthened by including the IP (-prefix) into the hash, ensuring that the code can't be obtained by someone on a different network. I also removed the login form of every page. Felt kinda pointless.
2013-11-25CommonHTML: Made 'copy' tab invisible to users without editsYorhel1-1/+1
2012-07-24Add wishlist / VN list status options to VN list browserSpaceRanger1-0/+8
2012-07-02Handler::VNPage: Added releases tab + comparison tableSpaceRanger1-0/+6
2012-01-25Do most of the table striping in CSSYorhel2-15/+14
Using CSS3 selectors. This is a more elegant approach, and since browser support for CSS3 selectors isn't as crap as it used to be I can finally make use of them.
2012-01-10Allow one fractional digit for VN votesYorhel2-11/+11
The interface to set a non-integer vote isn't very nice, but at least it works. Or so I hope.
2011-12-29Added duplicate check when adding VNsYorhel2-6/+13
2011-10-24Added 'role' filter to character browserYorhel1-1/+1
2011-08-30Changed "remove"- and "add"-like words to a single lang.txt entryQCyph1-1/+1
2011-08-27Added filters to character browse page and trait pageQCyph1-2/+3
2011-08-24Util/CommonHTML.pm: fixed copy tab and edit message bugs on character pageQCyph1-2/+2
2011-08-23Re-structured password recovery featureYorhel1-3/+27
Rather than setting an automatically password, reset the password and send an email with a secure token instead. The password can then be set again using this token. This doesn't really have an advantage at this point, just makes the interface and code more consistent when I update the registration code to do something similar.
2011-08-22Removed support for pre-2.6 passwordsYorhel1-9/+1
Users who haven't logged in since 2009-08-09 will find that their passwords have been reset. They need to use the password recovery feature before logging in again.
2011-05-17Bugfix: Don't allow duplicate trait names/aliasses within the same groupYorhel1-1/+6
This makes the denied trait listing useful again.
2011-05-01Switched back to Algorithm::Diff::XSYorhel1-3/+6
Algorithm::Diff::Fast suddenly disappeared for some reason...
2011-05-01Don't show some contribute links when you can't contributeYorhel1-3/+7