Kevin Morris
32660881f6
fix(docker): set notifications up in test config
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-09 11:06:29 -08:00
Kevin Morris
c3d962a0d0
fix(templates): add some comments
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-09 11:06:19 -08:00
Kevin Morris
061e828f16
fix(gitlab-ci): use logging.prod.conf for sharness
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-07 15:09:20 -08:00
Kevin Morris
7831503c19
fix(docker): use logging.prod.conf for sharness
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-07 15:09:20 -08:00
Kevin Morris
409229739e
feat(conftest): set default logging.conf to DEBUG
...
We now maintain a logging.prod.conf, which should contain sane
defaults for a production instance. Our main logging.conf is
a good default for both testing and debugging, but provides
too much logging for production.
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-07 15:09:13 -08:00
Kevin Morris
50d6a9b5c8
Merge branch 'fix-unlinked-pkgname' into pu
2021-12-07 13:57:14 -08:00
Kevin Morris
73034c7998
Merge branch 'fix-unneeded-newline' into pu
2021-12-07 13:57:06 -08:00
Kevin Morris
1b203f0d30
fix(requests): show unlinked pkgname when PackageBase has been deleted
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-07 13:51:38 -08:00
Kevin Morris
452f5d160a
fix(python): remove unneeded newline
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-07 13:50:40 -08:00
Kevin Morris
31d82fb1af
fix(templates): correct Closed link display
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-07 13:49:57 -08:00
Kevin Morris
2df54bd7a0
Merge branch 'fix-package-link' into pu
2021-12-07 12:35:21 -08:00
Kevin Morris
de7e3ab607
fix(logging): restore aurweb logger; null out root logger
...
After actually digging into how the logger does things,
since the root logger is required and we have specific
level-changing loggers for our components, we must no-op
the root logger to avoid it duplicating logs from the others.
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-07 07:45:59 -08:00
Kevin Morris
a9a0adaead
fix(python): fix package_link check
...
This was failing when it matched more than one record.
This fixes that issue by using an EXISTS query.
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-07 07:44:56 -08:00
Kevin Morris
8b350066c1
Merge branch 'fix-package-vote' into pu
2021-12-06 23:45:35 -08:00
Kevin Morris
4667993dad
Merge branch 'fix-comaintainer' into pu
2021-12-06 23:45:20 -08:00
Kevin Morris
0447afa2e5
fix(PackageNotification): add missing backref cascade
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-06 23:02:53 -08:00
Kevin Morris
51b4709ea4
fix(PackageVote): include backref cascade definition
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-06 23:02:06 -08:00
Kevin Morris
57df6db609
fix(PackageComaintainer): populate backref cascade properly
...
Closes #205
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-06 23:01:04 -08:00
Kevin Morris
27f8603dc5
fix(python): fix ordering of fields in partials/account_form.html
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-04 17:56:02 -08:00
Kevin Morris
cf978e23aa
fix(python): use S argument to decide Suspended
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-04 17:56:02 -08:00
Kevin Morris
0ed752277c
Merge branch 'fix-account-show' into pu
2021-12-04 17:54:36 -08:00
Kevin Morris
8501bba0ac
change(python): rework session timing
...
Previously, we were just relying on the cookie expiration
for sessions to expire. We were not cleaning up Session
records either.
Rework timing to depend on an AURREMEMBER cookie which is
now emitted on login during BasicAuthBackend processing.
If the SID does still have a session but it's expired,
we now delete the session record before returning.
Otherwise, we update the session's LastUpdateTS to
the current time.
In addition, stored the unauthenticated result value
in a variable to reduce redundancy.
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-04 02:16:22 -08:00
Kevin Morris
224a0de784
fix(python): add logged in date field to account/show.html
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-04 01:16:14 -08:00
Kevin Morris
2ea4559b60
fix(python): use correct Status field in account/show.html
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-04 00:54:03 -08:00
Kevin Morris
f8bef16d32
Merge branch 'fix-account-links' into pu
2021-12-04 00:25:57 -08:00
Kevin Morris
973dbf0482
fix(python): use creds to determine account links to display
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-04 00:15:34 -08:00
Kevin Morris
d0fc56d53f
fix(python): redirect when the request user can't edit target user
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-04 00:14:55 -08:00
Kevin Morris
bfa916c7b2
fix(fastapi): fix PGP Key Fingerprint display for account/show.html
...
There's a space between every 4 characters in the fingerprint
in PHP; we were missing it in FastAPI. This commit fixes that
inconsistency.
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-03 23:40:16 -08:00
Kevin Morris
522177e813
Merge branch 'fix-clean-auth-docs' into pu
2021-12-03 18:29:47 -08:00
Kevin Morris
aa717a4ef9
change(fastapi): no longer care about ResetKey collisions
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-03 17:59:02 -08:00
Kevin Morris
b0b5e4c9d1
fix(fastapi): use secrets
module to generate random strings
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-03 17:58:58 -08:00
Steven Guikal
75ad2fb53d
fix(FastAPI): cleanup auth_required decorator
...
Signed-off-by: Steven Guikal <void@fluix.one>
2021-12-03 14:07:47 -05:00
Kevin Morris
81f8c23265
fix(fastapi): log out IntegrityError from failed SID generation
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-02 23:42:13 -08:00
Kevin Morris
806a19b91a
feat(fastapi): render a 500 html response when unique SID generation fails
...
We've seen a bug in the past where unique SID generation fails and
still ends up raising an exception.
This commit reworks how we deal with database exceptions internally,
tries for 36 iterations to set a fresh unique SID, and raises a 500
HTTPException if we were unable to.
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-02 23:26:42 -08:00
Kevin Morris
abfd41f31e
change(fastapi): centralize HTTPException
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-02 23:23:27 -08:00
Kevin Morris
a747548254
Merge branch 'fix-navbar-spacing' into pu
2021-12-02 17:32:19 -08:00
Kevin Morris
e1bf6dd562
fix(fastapi): restore stripped whitespace in archdev-navbar
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-02 17:09:37 -08:00
Steven Guikal
42701514e7
fix(FastAPI): Use HTTPStatus instead of raw number
...
Signed-off-by: Steven Guikal <void@fluix.one>
2021-12-01 21:15:49 +00:00
Kevin Morris
0435c56a41
update test/README.md to be more aligned with the current state
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 12:27:14 -08:00
Kevin Morris
c09784d58f
fix(auth.auth_required): remove unused keyword arguments
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 11:56:44 -08:00
Kevin Morris
112837e0e9
fix(test_auth): cover mismatched referer situation
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 11:53:43 -08:00
Kevin Morris
043ac7fe92
fix(test_aurblup): use correct type hint for tmpdir
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:33:31 -08:00
Kevin Morris
fccd8b63d2
housekeep(fastapi): rewrite test_auth_routes with fixtures
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:33:30 -08:00
Kevin Morris
7ef3e34386
housekeep(fastapi): rewrite test_accounts_routes with fixtures
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:33:30 -08:00
Kevin Morris
de0f919077
housekeep(fastapi): rewrite test_ban with fixtures
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:33:30 -08:00
Kevin Morris
eb396813a8
housekeep(fastapi): rewrite test_package with fixtures
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:33:29 -08:00
Kevin Morris
5b14ad4065
housekeep(fastapi): rewrite test_user with fixtures
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:33:28 -08:00
Kevin Morris
140f9b1fb2
housekeep(fastapi): rewrite test_package_dependency with fixtures
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:30:23 -08:00
Kevin Morris
05bd6e9076
housekeep(fastapi): rewrite test_package_vote with fixtures
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:30:22 -08:00
Kevin Morris
150c944758
housekeep(fastapi): rewrite test_package_group with fixtures
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:30:22 -08:00