Commit graph

96 commits

Author SHA1 Message Date
Mike McLean
8bc1c1b466 fix bandit B704 2025-05-07 14:07:04 +02:00
Mike McLean
0fa58716cc move templates into subdir 2025-05-07 14:07:04 +02:00
Mike McLean
0321b7128b Unit tests, fixes, and cleanup 2025-05-07 14:07:03 +02:00
Mike McLean
dee1127ce8 Initial jinja2 porting work 2025-05-07 14:07:03 +02:00
Mike McLean
28b9ef7c64 avoid duplicate environ.get call 2025-02-25 11:10:45 -05:00
Mike McLean
af18c59623 work around parse_qs behavior in python < 3.11 2025-02-24 12:17:24 -05:00
Mike McLean
4eecaddb47 drop cgi import
Fixes https://pagure.io/koji/issue/3966
2024-10-29 22:08:58 -04:00
Mike McLean
6629adff0e use url quoting for rpm url arg 2024-09-30 10:46:29 -04:00
Mike McLean
05155bf9cf fix unit tests 2024-09-30 10:46:29 -04:00
Mike McLean
b392fadf60 rework escaping in web ui 2024-09-30 10:46:26 -04:00
Yu Ming Zhu
f41b8c70a7 Bandit [B411]: use defusedxml to prevent remote XML attacks
- putting xmlrpc stuff into koji.xmlrpcplus
- adding koji.xmlrpcplus.xmlrpc_server to refer
- replacing refs of original xmlrpc.client.dumps to enhanced
  koji.xmlrpcplus.dumps

fixes: #3964
2024-02-02 09:08:18 +01:00
Mike McLean
134360df2e mark draft rpms in web ui lists 2024-01-05 10:00:44 +00:00
Jana Cupova
de192e10f1 Add repoID in listBuildroots and create repoinfo command
Add repoID param in listBuildroots and show result in repoInfo
Create new command repoinfo which provides equivalent info as repoInfo
Add number of buildroots related to repo in repoinfo page

Fixes: https://pagure.io/koji/issue/2549
2023-04-03 15:20:18 +02:00
Jana Cupova
7897628159 Add active sessions web page
Fixes: https://pagure.io/koji/issue/3396
2022-11-10 10:17:51 +01:00
Tomas Kopecek
9d289bc336 convert data to string in escapeHTML first
Related: https://pagure.io/koji/issue/3449
2022-08-17 11:16:13 +02:00
Jana Cupova
c83d4598de Escape html values
Fixes: https://pagure.io/koji/issue/3155
2022-02-07 09:36:59 +01:00
Jana Cupova
d370e42c64 www: rpminfo/fileinfo/imageinfo/archiveinfo page shows human-readable filesize
Fixes: https://pagure.io/koji/issue/2943
2021-12-13 17:05:17 +01:00
Tomas Kopecek
aa2011c72b web: don't use count(*) on first tasks page
Fixes: https://pagure.io/koji/issue/2482
2021-05-10 09:13:13 +02:00
Alex Iribarren
94df7a1f74 Make flake8 happy 2021-04-19 15:09:36 +02:00
Alex Iribarren
41d5414245 Don't encode already encoded entities 2021-04-19 15:09:36 +02:00
Alex Iribarren
1c7f83acf6 Escape single and double quotes as well, plus add test 2021-04-19 15:09:36 +02:00
Alex Iribarren
a233a0ca72 Show VCS and DistURL tags as links when appropriate 2021-04-19 15:09:36 +02: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
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
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
Tomas Kopecek
758f0a0311 don't break on invalid task
Fixes: https://pagure.io/koji/issue/2112
2020-03-30 15:03:34 +02: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
Yuming Zhu
0f727a2ab4 flake8: apply E3 rules 2020-03-03 21:38:22 +08:00
Yuming Zhu
05340b146b flake8: apply E2 rules except E266 2020-03-03 21:38:21 +08:00
Yuming Zhu
ce1f9928af flake8: apply E1 rules 2020-03-03 21:38:21 +08:00
Yuming Zhu
97cfaa4fcf flake8: follow E265 rule 2020-03-03 21:35:08 +08:00
Tomas Kopecek
96d3cff5f2 remove usage of deprecated cgi.escape function
Fixes: https://pagure.io/koji/issue/1887
2020-02-13 14:44:50 +01:00
Yu Ming Zhu
5b83c682e4 remove unused imports 2019-12-12 11:00:58 +00:00
Yu Ming Zhu
b8653736dd sort imports in www 2019-12-12 11:00:56 +00:00
Tomas Kopecek
a803f0a0f3 [web] human-friendly file sizes in taskinfo page
Fixes: https://pagure.io/koji/issue/1819
2019-12-12 13:23:26 +01:00
Tomas Kopecek
dfbe322222 deprecate sha1/md5_constructor from koji.util
These functions are now fully provided by hashlib. Commit removes their
usage from koji's codebase and leaves deprecation message in lib.

Final removal from lib is scheduled to 1.21.

Fixes: https://pagure.io/koji/issue/1487
2019-08-12 16:07:55 -04:00
Tomas Kopecek
15e4d07763 encode to bytes only under py3
Related: https://pagure.io/koji/pull-request/1498
2019-06-24 18:09:10 -04:00
Mengjing Shi
2d88836a4b Pass bytes to md5_constructor
Fixes login TypeError on koji-web
2019-06-24 18:07:23 -04:00
Tomas Kopecek
7a5c9130bc retain form values in search page 2019-06-14 15:23:49 -04:00
Tomas Kopecek
e5b0a3ac6e display task durations in webui
Fixes: https://pagure.io/koji/issue/1382
2019-05-06 10:33:06 -04:00
Tomas Kopecek
eeeeb3ab78 skip fixEncoding for py3 2019-03-04 10:13:51 -05:00
Tomas Kopecek
ee673d4b66 Web UI python3 changes
Fixes: https://pagure.io/koji/issue/890
2019-02-12 15:01:37 -05:00
Tomas Kopecek
8e61dc7c56 python-modernize -f libmodernize.fixes.fix_classic_division 2018-07-11 17:37:40 -04:00