diff options
| author | Juuso Lapinlampi <wub@partyvan.eu> | 2015-11-16 07:32:29 +0100 |
|---|---|---|
| committer | Juuso Lapinlampi <wub@partyvan.eu> | 2015-11-16 07:56:58 +0100 |
| commit | 8a4f021d49804391a36da4905b033deffa5acb46 (patch) | |
| tree | 06f5f09aa89a2bbe4c8384d5acbd3c4380d52eee /js/cabinet.js | |
| parent | e0bb4e05d30e880941f4299755d8f234f5a09894 (diff) | |
Fix generate_name() imaginary column "pomf" to "files"
(Partially reverts commit e0bb4e0.)
Actually fix generate_name() COUNT query this time. It still had an
imaginary table "pomf" from e0bb4e0. Change it to "files" like in the
schema.
For code consistency, :filename is reverted back to :name as it was
before commit e0bb4e0. That commit is bogus and doesn't fix the issue
due to skipping the code review process.
The problem with this COUNT query in first place was that it checked
imaginary columns (name) from an imaginary table (pomf) in the database.
This led to the "same filename" check not working at all, and the other
code only relying on checking the same hash (currently SHA-1) for
returning the filename before generate_name().
By luck, generated filenames could collide and another file of the same
generated filename would be returned, discarding the new upload.
I discovered this bug about a month ago myself, but back then there was
no reliable way to reproduce it and no good description of the bug.
This bug was introduced in commit 5b77a4e.
Reported-by: Vhum Vhum <vhumvhum1@gmail.com>
Suggested-by: Luminarys <luminarys@fuwa.se>
OK ewhal@, luminarys@
Diffstat (limited to 'js/cabinet.js')
0 files changed, 0 insertions, 0 deletions
