Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
This removes the reliance on sort() to provide meaningful ordering (the
keys aren't always good for ordering) and removes the 'order' hack used
for (vn|prod)_relations.
|
|
Now that graphviz knows the actual strings, it has a better opportunity
to create better graphs.
(Most of them still look messy tho)
|
|
|
|
|
|
The API IP address doesn't change often, but we don't want months of
downtime when it does.
|
|
|
|
|
|
I'd have preferred to stick with XHTML 1.0, but unfortunately browsers
won't allow you to use modern Javascript APIs with an older doctype.
Note that most pages don't actually validate correctly as HTML5, I'm
relying on browsers to be lenient.
In either case, I'd like VNDB to stay valid XML (XHTML5, then), and
luckily that shouldn't be a problem.
|
|
They had to be deleted from the database at some point, otherwise we
still have thousands of easily-cracked password hashes in the database.
Note that I could have opted to use scrypt on top of the sha256 hashes
so the passwords would remain secure without needing to reset
everything, but doing that after one year of switching to scrypt is
likely not worth it. Everyone who still actively uses his account has
already been converted to scrypt, everyone else should just reset their
password whevener they decide to come back.
|
|
Turns out the anime data hasn't been updated in a few months. Oops.
|
|
That should be the last thing to convert to the new schema.
|
|
Turns out that fetching whether or not you have unread notifications
(done on every pageview if you're logged in) was pretty slow. The index
speeds up both that query and the "my notifications" view.
The extra purge for old notifications for users with more than 500
notifications ensures that the index stays effective for the unread
notifications count. Otherwise it'll have to read half of the
notifications table anyway to check the 'unread' filter.
|
|
Hopefully prevents issues like https://vndb.org/t3599.53
|
|
This was more trivial than I had expected. I already took ipv6 into
account when rewriting the API for AnyEvent (including the use of
norm_ip()), so that part was fine. The only part I had to fix was the
listening socket, and I had to ensure that the $c->{ip} was correct. The
first was easy, and the latter was properly handled by AnyEvent
automatically. Looks like AnyEvent automatically 'unpacks' IPv4-mapped
IPv6 addresses, so I didn't have to deal with that myself.
|
|
This is to save system resources when a misbehaving client keeps sending
commands while it's being throttled. It also protects against trivial
DoS attacks.
|
|
AE::timer accepts a time interval as argument, not a complete
timestamp. So the monthly cron job hasn't run in a while...
|
|
|
|
|
|
|
|
|
|
I forgot that AnyEvent::Handle works with bytes rather than unicode
strings, even though that is kind of obvious. I expected that
AnyEvent::IRC would automatically handle the conversion between byte
strings and Unicode strings, but it doesn't, so that has to be done
manually.
|
|
|
|
I probably don't want to have the 'trace' log level on the actual
server.
|
|
Ugh I wish I had proper unit tests. Ugh writing proper unit tests is a
loooot more work than just doing a bunch of quick manual tests.
|
|
|
|
|
|
|
|
Includes changes from 5926ce95395976456c0e15895d13491a81819087 and
e20b19ce400ccf382a969a51777e0678ff8d44db
|
|
|
|
It's not as fully featured as the previous implementation, but most of
those features haven't been used for the past few years anyway.
Also added a generic throttle implementation in Multi::Core, which can
be re-used for the API.
|
|
The solution that has been implemented upstream is a little different
from my patch, but it works well.
|
|
|
|
|
|
AnyEvent::Util::run_cmd() is a godsent. POE was such a hassle in that
area.
|
|
|
|
|
|
|
|
Requires a patch to AnyEvent::Pg:
https://rt.cpan.org/Ticket/Display.html?id=99719
|
|
That is, stop all watchers that we want to stop and only shut down when
there are no active watchers anymore. This ensures that we're not
shutting down in the middle of some operation.
|
|
|
|
Currently only Multi::Core works, trying to use any other modules will
fail.
|
|
|
|
I broke this when changing the column type of login_throttle.timeout.
|
|
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.
|
|
Easier to work with in custom queries.
|