Commit graph

595 commits

Author SHA1 Message Date
Jana Cupova
9dc0efd476 api getLastHostUpdate returns timestamp
fixes: https://pagure.io/koji/issue/2497
2021-03-29 11:23:06 +02:00
Tomas Kopecek
700a7bbdd4 web: optional KojiHubCA usage
Fixes: https://pagure.io/koji/issue/2742
2021-03-24 17:18:05 +01:00
Tomas Kopecek
ebdbb80e02 drop PyOpenSSL usage
We've replaced it with requests library some time ago, this code has no
better sensitivity than requests error checking, so we can drop it
completely.

Fixes: https://pagure.io/koji/issue/2752
2021-03-24 14:43:40 +01:00
Alex Iribarren
519d8c4fa6 Escape vcs and disturl 2021-03-10 16:29:21 +01:00
Tomas Kopecek
072cb316d3 web: set WSGIProcessGroup inside Directory
Don't alter server-wide configuration, just kojiweb.

Fixes: https://pagure.io/koji/issue/2695
2021-03-02 15:33:16 +01:00
Tomas Kopecek
13f4023bf5 flake8 fixes 2021-02-16 14:43:49 +01:00
Tomas Kopecek
9fb1a537cb web: fix error for missing headers
Bug introduced in https://pagure.io/koji/pull-request/2683

Related: https://pagure.io/koji/issue/2541
2021-02-16 14:15:06 +01:00
Tomas Kopecek
8fb0a530a2 web: use correct srpm for getting headers
Related: https://pagure.io/koji/issue/2541
2021-02-16 14:10:57 +01:00
Tomas Kopecek
0b99fe14fb web: display VCS/DistURL rpm tags
Fixes: https://pagure.io/koji/issue/2541
2021-02-08 13:58:42 +01:00
Tomas Kopecek
d979b6d92a update task colors 2021-02-05 14:23:32 +01:00
Tomas Kopecek
684a3389c4 web: more accessible task colors/icons
Fixes: https://pagure.io/koji/issue/2583
2021-02-05 14:23:32 +01:00
Tomas Kopecek
96ae0ecef5 explicit encoding for text file operations
Fixes: https://pagure.io/koji/issue/2641
2021-01-26 13:36:25 +01:00
Ken Dreyer
5c3425b32b web: add comment explaining null start_time values
Explain why kojiweb falls back to creation_ts when start_ts is
unavailable. Thanks MikeM for the explanation.
2021-01-25 10:12:08 -07:00
Tomas Kopecek
87ff61574b web: return correct content-length
Fixes: https://pagure.io/koji/issue/2638
2021-01-25 14:40:45 +01:00
Tomas Kopecek
6d4831a6dc web: input validation
Fix for CVE-2020-15856

Fixes: https://pagure.io/koji/issue/2645
2021-01-18 11:06:35 +01:00
lrossett
1c787a323f flake8 fixes 2020-12-14 13:26:00 +01:00
lrossett
74061d5d71 set serverca opts 2020-12-14 13:26:00 +01:00
Michal Privoznik
66ba134859 Install into /usr/lib rather than /usr/lib64/
In koji-1.22.0-129-g0ef3c751 I've changed the way how
site-packages directory is obtained. What I did not realize back
then is there can be multilib systems which will not search for
packages in /usr/lib64. But 64bit systems do look into /usr/lib.
Therefore, let's pick the location where both systems work.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1894261
Fixes: #2578
https://pagure.io/koji/issue/2578
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2020-11-27 10:00:52 +01:00
Tomas Kopecek
6854803aec web: order methods by name in select box
Fixes: https://pagure.io/koji/issue/2556
2020-11-10 12:06:52 +01:00
Tomas Kopecek
07772a1ecc web: disable links to deleted tags
Fixes: https://pagure.io/koji/issue/2543
2020-11-05 14:16:02 +01:00
Alex Iribarren
c9b23e6619 Only redirect back to HTTP_REFERER if it points to kojiweb 2020-10-29 09:28:30 +01:00
Tomas Kopecek
d231fa02cb to_list is not needed in py3 code
Fixes: https://pagure.io/koji/issue/2514
2020-10-27 12:55:59 +01:00
Tomas Kopecek
a14a1fee39 fix for older hub 2020-09-30 10:43:19 +02:00
Tomas Kopecek
5f472413c9 drop host versions 2020-09-30 10:43:19 +02:00
Tomas Kopecek
ba908fd2de report versions of components
Fixes: https://pagure.io/koji/issue/2430
2020-09-30 10:43:19 +02:00
Michal Privoznik
0ef3c75185 Simplify obtaining of PKGDIR
So far, in all Makefiles we have a complicated way to construct
PKGDIR path which is used to install python modules into.
Firstly, python version is obtained, and then system prefix and
these are then used to construct the PKGDIR path. Well, we can do
better. We can use 'site.getsitepackages()[0]' to obtain exactly
the path we are after.

This also fixes the problem on distributions which have split
/usr/lib and /usr/lib64 directories, because with the way we are
constructing the PKGDIR path we assume that the directories are
the same (or one is a symlink to another). Well, that is not
always the case.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2020-09-22 13:45:48 +02:00
Tomas Kopecek
968a129290 web: wrong variable name
Fixes: https://pagure.io/koji/issue/2491
2020-09-22 09:54:28 +02:00
Tomas Kopecek
f4d0898a71 web: urlquote buildtarget/buildtag names
Fixes: https://pagure.io/koji/issue/2468
2020-09-17 14:12:05 +02:00
Tomas Kopecek
e72a7be0a1 stricter config file permissions
Fixes: https://pagure.io/koji/issue/2124
2020-09-07 09:37:11 +02:00
Tomas Kopecek
4240e269bc fix create_ts for repos 2020-08-26 09:26:00 +02:00
Tomas Kopecek
bf5684a122 fix start_ts 2020-08-26 09:26:00 +02:00
Tomas Kopecek
7855b98ca2 formatTime/Long can handle timestamp
Also replaced *_time with *_ts wherever possible.
2020-08-26 09:26:00 +02:00
Tomas Kopecek
a4d63d6454 web: better error message for invalid build
Fixes: https://pagure.io/koji/issue/1545
2020-08-18 16:35:43 +02:00
Tomas Kopecek
f8419e3626 remove deprecated krbV support
Fixes: https://pagure.io/koji/issue/1991
2020-07-24 15:08:47 -04:00
Tomas Kopecek
60048297dc fix simple_error_message encoding
Fixes: https://pagure.io/koji/issue/2341
2020-07-02 10:28:44 +02:00
Ken Dreyer
0923a2eae2 web: remove "GssapiLocalName off" setting
mod_auth_gssapi already defaults GssapiLocalName to off. Simplify our
configuration and just remove this line.
2020-07-01 16:29:34 -06:00
Tomas Kopecek
50bcb6f3bc replace md5 with sha256 2020-06-24 14:42:01 +02:00
Yu Ming Zhu
0a61104280 web: use sha1 for token generation instead of md5(disabled by FIPS)
fixes: #2291
2020-06-24 14:42:00 +02:00
Tomas Kopecek
af311184fc dropping six from hub/web 2020-06-18 15:41:35 +02:00
Tomas Kopecek
b84be525c0 www: repoinfo page
Fixes: https://pagure.io/koji/issue/2181
2020-05-25 10:39:34 +02:00
Ken Dreyer
72b7418658 kojiweb: update for mod_auth_gssapi configuration
Delete the mod_auth_kerb configuration settings from the sample
kojiweb.conf file. Add the mod_auth_gssapi settings instead.
2020-05-18 11:42:43 +02:00
Tomas Kopecek
0132313f92 replace logging.warn with warning
call is deprected in python 3.7

Fixes: https://pagure.io/koji/issue/2135
2020-04-22 13:47:15 +02:00
Tomas Kopecek
220eca4319 display merge mode for external repos
Fixes: https://pagure.io/koji/issue/2096
2020-04-01 12:58:41 +02:00
Tomas Kopecek
758f0a0311 don't break on invalid task
Fixes: https://pagure.io/koji/issue/2112
2020-03-30 15:03:34 +02:00
Adam Williamson
9b86c5081e Don't use datetime timestamp() as it's not in Python 2
The `timestamp()` method for `datetime.datetime` instances was
only added in Python 3. It does not exist in Python 2. So we
can't safely use it here.

I believe this should do the right thing, taking advantage of a
couple of existing utility functions in koji.util.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-03-16 10:46:47 +01:00
Yuming Zhu
cf34706f04 use Exception instead of BaseException for bare expection 2020-03-03 21:38:22 +08:00
Yuming Zhu
c5db34a8e1 flake8: apply E501 with max-line-length=99 2020-03-03 21:38:22 +08:00
Yuming Zhu
f1ba6cefd7 flake8: apply all rest E7 rules 2020-03-03 21:38:22 +08:00
Yuming Zhu
6ed30954b2 flake8: apply E71x rule 2020-03-03 21:38:22 +08:00
Yuming Zhu
fa69c4904e flake8: apply E70x rule 2020-03-03 21:38:22 +08:00