Commit Graph

312 Commits

Author SHA1 Message Date
rr- 28bcbd33b9 server/posts: use SHA1 checksums
This changes the checksums to ones that are compatible with 1.x, which
relieves the migration script from recalculating the checksums for all
the posts.
2016-08-20 13:06:19 +02:00
rr- 80af79779d server/snapshots: rewrite 2016-08-16 21:51:25 +02:00
rr- 65119d69ab server/rest: urldecode incoming paths 2016-08-16 21:42:11 +02:00
rr- 0c2efc0be5 server/rest: work around Python bug 27777
(See http://bugs.python.org/issue27777)
2016-08-16 21:42:11 +02:00
rr- e89a086d58 server/rest: fix reporting parameter type errors 2016-08-16 21:42:11 +02:00
rr- ff7bbbdd8a server/db: fix upgrade (regression from 9aea55e) 2016-08-16 21:42:11 +02:00
rr- 6c29377f6b server/db: allow full DSN; use memdb in tests
The earlier commit is still relevant as it allows to integrate real
database when needed.
2016-08-16 21:42:09 +02:00
rr- e688f39887 server/db: specify nullable for foreign keys
This is mostly stylistic change, but it clearly shows the intended
behavior should we detect more integrity violation errors.
2016-08-16 17:22:33 +02:00
rr- 522886ae6c server/db: fix user cascade deletions 2016-08-16 17:22:33 +02:00
rr- a224297c4f server/db: poor fix for tag aliases' order
It's a hack, but it seems to work okay.
2016-08-16 17:22:33 +02:00
rr- 48af5160df server/search: fix negative offsets causing ISE 2016-08-16 17:22:33 +02:00
rr- 87b1ee4564 server/tests: use real database
I'm experimenting with snapshots and found following limitation of
SQLite: https://www.sqlite.org/isolation.html
2016-08-16 17:22:33 +02:00
rr- 0320a0b55b server/general: improve versioning effectiveness
...by integrating it with sqlalchemy that adds WHERE conditions for each
UPDATE and DELETE statement.
2016-08-16 17:22:33 +02:00
rr- ef4af697c4 server/tags: fix tag sorting
Brainfart from d6942121e5
2016-08-14 17:54:15 +02:00
rr- 9aea55e3d1 server/general: embrace most of PEP8
Ignored only the rules about continuing / hanging indentation.

Also, added __init__.py to tests so that pylint discovers them. (I don't
buy pytest's BS about installing your package.)
2016-08-14 16:44:03 +02:00
rr- af62f8c45a server/general: ditch falcon for in-house WSGI app
For quite some time, I hated Falcon's class maps approach that caused
more chaos than good for Szurubooru. I've taken a look at the other
frameworks (hug, flask, etc) again, but they all looked too
bloated/over-engineered. I decided to just talk to WSGI myself.

Regex-based routing may not be the fastest in the world, but I'm fine
with response time of 10 ms for cached /posts.
2016-08-14 16:43:35 +02:00
rr- d102c9bdba server/tests: update func.posts tests 2016-08-14 16:43:35 +02:00
rr- 264f9ee70b server/tests: update func.mime tests 2016-08-14 16:43:35 +02:00
rr- c23c401c4d server/tests: add func.tags tests 2016-08-14 16:43:35 +02:00
rr- 53e96ba41f server/tests: add func.tag_categories tests 2016-08-14 16:43:35 +02:00
rr- 81dfbaec98 server/tests: add func.users tests 2016-08-14 16:43:35 +02:00
rr- 03c74cb5a3 server/tests: add func.comments tests 2016-08-14 16:43:35 +02:00
rr- 65efc309a8 server/comments: catch bad IDs 2016-08-14 16:43:31 +02:00
rr- 56b3eb9674 server/util: fix case conversion 2016-08-14 16:43:04 +02:00
rr- 86452019a3 server/util: improve catching bad field names
KeyError could catch exceptions that happened inside the serializer
routine and mistakenly report them as an error with user input.
2016-08-14 16:43:04 +02:00
rr- f6f07a35df server/general: authenticated_user->auth_user 2016-08-14 16:43:04 +02:00
rr- c2bbf7b62c server/general: add assertions 2016-08-14 16:43:04 +02:00
rr- bb86e9bf56 server/posts: add more safety checks for notes 2016-08-14 16:43:04 +02:00
rr- 7cd4a1a530 server/tags: verify description size 2016-08-14 16:43:01 +02:00
rr- 3db4f39545 server/tag-categories: correct exception type 2016-08-14 12:31:46 +02:00
rr- 92075bb455 server/tags: don't verify tag names while getting 2016-08-14 12:31:46 +02:00
rr- d6942121e5 server/tags: change tags sort order 2016-08-14 12:31:21 +02:00
rr- 07237bc2bc server/tags: fix changing name case 2016-08-14 11:39:04 +02:00
rr- 7e5deee76b server/tags: fix tag merging 2016-08-14 11:39:04 +02:00
rr- 2b3d193b7c server/tags: don't auto-create tag categories 2016-08-14 11:38:59 +02:00
rr- 8d04df38fd server/general: add entity versions 2016-08-07 09:55:51 +02:00
rr- 9e2dace73f server/posts: improve errors for bad note points 2016-08-05 23:02:34 +02:00
rr- 5092c2c587 server/posts: respect tag creating privilege 2016-08-02 12:44:38 +02:00
rr- a9338f6490 server/general: fix pylint warnings 2016-08-02 12:27:01 +02:00
rr- 2429e95102 server/users: fix cascade deletions 2016-08-02 12:27:01 +02:00
rr- ff189a3915 server/posts: fix deleting post with comments 2016-08-02 12:27:01 +02:00
rr- 92d290b2a4 server/posts: fix removing custom thumbnails 2016-07-31 23:53:23 +02:00
rr- 5e47c5c0c6 server/users: use HTTPS for Gravatar 2016-07-30 13:43:15 +02:00
rr- ef76cdaf8a server/posts: always use null size for bad images 2016-07-30 13:43:15 +02:00
rr- 298aedbc75 server/tags: sort relations like post tags 2016-07-30 13:43:15 +02:00
rr- f40e41ae8b server/tags: allow deleting used tags 2016-07-30 13:43:15 +02:00
rr- 8ef0017531 server/tags: improve tag export performance
2000 ms --> 250 ms (including overhead of unknown size).
Not bad if you ask me.
2016-07-26 23:20:15 +02:00
rr- 3f2717843a server/middleware: log request method 2016-07-26 23:20:15 +02:00
rr- 603420a31d server/middleware: remove unused import 2016-07-17 21:14:56 +02:00
rr- b7f2982c9e server/posts: fix relations bidirectionality 2016-07-17 21:14:03 +02:00
rr- c472229bae server/posts: add relationCount field 2016-07-03 18:30:32 +02:00
rr- c21494be25 server/posts: make relations bidirectional 2016-07-03 18:30:32 +02:00
rr- 48d6fb6b43 server/posts: include thumbnail URLs in relations 2016-07-03 18:30:32 +02:00
rr- 5800f0ebc7 server/tags: fix merging tags
It violated unique constraint on post_tag when a given post was already
tagged with the target tag.
2016-07-03 18:30:32 +02:00
rr- af36c90618 server/general: improve request logging 2016-07-03 18:30:28 +02:00
rr- ac23067fdf server/general: use UTC time stamps 2016-07-03 14:46:28 +02:00
rr- aa0463dafb server/tags: improve creation privilege check 2016-06-23 12:51:44 +02:00
rr- d21b87581d server/general: add show_sql separate from debug 2016-06-23 12:20:05 +02:00
rr- 7eec347bca server/tags: add description field 2016-06-23 00:15:25 +02:00
rr- 2651cbb374 server/users: allow empty avatars if they existed 2016-06-19 19:43:53 +02:00
rr- 4ec826d0a5 server/tags: replace ILIKE expressions
While it makes sense to use ILIKE in search configs to expose side
effects regarding _ and % for power users to use, it certainly didn't
make sense in places changed by this commit. For example, visiting
/tag/___ led to internal server error.
2016-06-18 11:30:32 +02:00
rr- 3c3d0dbb8d server/info: expose a few config variables 2016-06-18 10:55:44 +02:00
rr- 13ca94d4da server/users: fix avatar issues when renaming user 2016-06-17 21:25:28 +02:00
rr- 1019062698 server/users: fix fetching columns 2016-06-16 23:42:36 +02:00
rr- 48cf3b47c0 server/users: don't fetch stats eagerly 2016-06-14 07:50:22 +02:00
rr- d0aaf8fa8f server/posts: optimize default sort order 2016-06-14 07:50:22 +02:00
rr- 36eddad424 server/posts: optimize 'posts around' query 2016-06-14 07:50:22 +02:00
rr- 6b68c77e17 server/posts: add relation-count token 2016-06-13 20:09:15 +02:00
rr- 7a6d25ac43 server/tags: cache default tag category 2016-06-12 22:30:05 +02:00
rr- 162904bfc3 server/info: add serverTime field 2016-06-12 14:26:52 +02:00
rr- 40565e82ae server/posts: change comment-time behavior
Rather than looking at the edit time, now it looks at the creation time.
2016-06-12 14:24:14 +02:00
rr- a67db59d99 server/comments: fix serializing cached scores 2016-06-12 14:01:38 +02:00
rr- e9fb93d5c8 server/general: rename _fields to fields 2016-06-11 22:33:33 +02:00
rr- 8c952c08d0 server/general: report bad field names to user 2016-06-11 17:36:02 +02:00
rr- b13f9dcb68 server/posts: fix comments order 2016-06-11 17:36:02 +02:00
rr- 616854fb1b server/users: let authorized users GET themselves 2016-06-11 17:36:02 +02:00
rr- b5aa3e75c4 server/comments: fix privileges 2016-06-11 17:36:02 +02:00
rr- 5090e3f6c9 server/comments: fix missing score field 2016-06-11 09:29:23 +02:00
rr- dfb2e3d027 server/posts: add getting posts around id
Leave undocumented since it add almost no value for the client
applications.
2016-06-08 22:38:35 +02:00
rr- ded89fee5f server/posts: fix handling bad post ID 2016-06-08 22:38:35 +02:00
rr- 053d1889e0 server/scores: voting for <1 removes favorite 2016-06-08 22:38:35 +02:00
rr- b28f689077 server/posts: add ownFavorite field to posts 2016-06-08 22:38:35 +02:00
rr- 93a5af2097 server/posts: sort by tag category, then by name 2016-06-06 07:46:19 +02:00
rr- f3bb6c28a1 server/general: cosmetic fixes 2016-06-05 10:39:56 +02:00
rr- 508cb6e7ab server/posts: allow anonymous uploads (#90) 2016-06-05 10:30:10 +02:00
rr- caecaee785 server/users: offer more stats in user entity 2016-06-03 21:46:25 +02:00
rr- 805ca845e3 server/users: reduce user fields footprint 2016-06-03 20:14:01 +02:00
rr- 8a5c6f0b31 server/search: fix caching special tokens
special:liked was being reused between users. Now the cache internally
caches object similar to liked:USER.
2016-06-03 19:47:09 +02:00
rr- f0d3589344 server/search: cache by query rather than its text 2016-06-03 19:47:09 +02:00
rr- 59ad5fe402 server/search: refactor, extract parsing 2016-06-03 19:47:09 +02:00
rr- 4428ccfd38 server/images: remove debug blob 2016-06-02 23:42:12 +02:00
rr- 28009bf46d server/general: fix pylint warnings 2016-06-02 23:39:38 +02:00
rr- 7c7adafd82 server/search: improve error messages 2016-06-02 21:15:29 +02:00
rr- a72f6aa585 server/search: fix searching for invalid numbers 2016-06-02 20:56:28 +02:00
rr- 1034362b84 server/search: fix searching by partial range 2016-06-02 20:56:28 +02:00
rr- 802c7feca0 server/search: add safety search for posts 2016-06-02 13:58:08 +02:00
rr- accb5a9187 server/images: fix transaprent background for JPEG 2016-06-02 13:58:08 +02:00
rr- 0743721d06 server/images: seek to 30% video before resizing 2016-06-02 13:58:08 +02:00
rr- 01c74526c7 server/images: work around ffmpeg bug 5609 2016-06-02 13:58:08 +02:00
rr- 446f4d6611 server/search: cache results till non-GET request
250 ms per page --> 30 ms per page (save for the first render). I'd say
it's pretty good
2016-05-31 14:18:50 +02:00