http://hg.code.sf.net:8000/p/roundup/code/atom-log/tip/frontends/roundup.cgi Mercurial Repository: p/roundup/code: frontends/roundup.cgi history 2026-04-08T21:00:34-04:00 feat: add TIMING option, python install dir setting, more cleanups http://hg.code.sf.net:8000/p/roundup/code/#changeset-646ba821f63e74267b437119e3de2b0697c714d2 John Rouillard rouilj@ieee.org 2026-04-08T21:00:34-04:00 2026-04-08T21:00:34-04:00
changeset 646ba821f63e
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description feat: add TIMING option, python install dir setting, more cleanups

Add commented out sys.path.append(...) for user to change location of
roundup libraries.

Add TIMING global to control output of timing information.

Some more ruff cleanups and remove from __future__ import
print_function. This is Python 3 for pete's sake.
files
bug: harden header/environment values for roundup-server and cgi http://hg.code.sf.net:8000/p/roundup/code/#changeset-5fbf6451a782cefeda7f886e01847fd51b2585f4 John Rouillard rouilj@ieee.org 2026-04-08T00:35:34-04:00 2026-04-08T00:35:34-04:00
changeset 5fbf6451a782
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description bug: harden header/environment values for roundup-server and cgi

If the environment (cgi) or header variables (server) have values with
characters outside of the printable ascii range (chr(32-126)), return
HTTP 400 error. This is overly strict but nothing that Roundup looks
at requires a larger range.

When deploying with wsgi and Zope, server software should verify
proper values.

This fix was riggered by the waitress wsgi server bug:

https://github.com/Pylons/waitress/security/advisories/GHSA-m5ff-3wj3-8ph4

which was caused by incorrect validation of header values resulting in
a the proxy and waitress having different interpretations of what the
header meant.

My testing of the roundup.cgi script is to use a cgi->wsgi wrapper and
run it under wsgi (using waitress). I need to try it under a real
server that can run cgi. It looks like python http.server --cgi is
missing definitions of HTTP_HOST and other required CGI
variables. That's probably why the --cgi option was removed, but it
leaves me without a good way to test.

Maybe https://github.com/mdklatt/pytest-cgi could be used to test that
front end? Arguably CGI is old, but cheap hosting still allows it.
files
fix: issue2551193 - Fix roundup for removal of cgi and cgitb ... http://hg.code.sf.net:8000/p/roundup/code/#changeset-978285986b2c9d73f4a39d745ab6a3bbab58af3d John Rouillard rouilj@ieee.org 2023-07-24T17:49:58-04:00 2023-07-24T17:49:58-04:00
changeset 978285986b2c
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description fix: issue2551193 - Fix roundup for removal of cgi and cgitb ...

standard python modules (and FieldStorage/MiniFieldStorage).

Vendor cgi.py and modify imports.

Details:

roundup/anypy/cgi_.py
import that accesses a working cgi.py. All imports dealing with cgi
now use cgi_.

roundup/anypy/vendored/cgi.py
vendored version 2.6 of cgi.py from:
https://pypi.org/project/legacy-cgi/

CHANGES.txt
change note added

COPYING.txt
added license for cgi.py

doc/rest.txt
change example to use cgi_

doc/upgrading.txt
doc removal and how to rework local code using cgi.py.

frontends/roundup.cgi
remove unneeded cgi import

roundup/cgi/actions.py
roundup/cgi/apache.py
roundup/cgi/client.py
roundup/cgi/templating.py
roundup/cgi/TAL/TALGenerator.py
test/db_test_base.py
test/rest_common.py
test/test_cgi.py
remove import cgi and replace with from roundup.anypy.cgi_ import
cgi

test/test_actions.py
test/test_templating.py
modify import to get *FieldStorage

test/test_admin.py
test/test_hyperdbvals.py
test/test_xmlrpc.py
remove unneeded cgi import
files
Convert cgi.escape to use html_escape from roundup.anypy.html http://hg.code.sf.net:8000/p/roundup/code/#changeset-032e5db8bf2f2fc2d51c737a4b79f111244343f6 John Rouillard rouilj@ieee.org 2023-07-24T16:55:22-04:00 2023-07-24T16:55:22-04:00
changeset 032e5db8bf2f
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description Convert cgi.escape to use html_escape from roundup.anypy.html

Update for vendoring of cgi.
files
[maint-1.6] Fix fix XSS issue in wsgi and cgi when handing url not found/404. issue2551035 http://hg.code.sf.net:8000/p/roundup/code/#changeset-ab37c1705dbf2a0bbf7acfd7aff64ea6f59fe292 John Rouillard rouilj@ieee.org 2019-03-22T18:16:11-04:00 2019-03-22T18:16:11-04:00
changeset ab37c1705dbf
branch maint-1.6
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description Fix fix XSS issue in wsgi and cgi when handing url not found/404. issue2551035
files
Fix fix XSS issue in wsgi and cgi when handing url not found/404. issue2551035 http://hg.code.sf.net:8000/p/roundup/code/#changeset-5579fa034f9e1dd99a6c760922aa8cd08a9e6559 John Rouillard rouilj@ieee.org 2019-03-22T18:16:11-04:00 2019-03-22T18:16:11-04:00
changeset 5579fa034f9e
branch
bookmark
tag
user John Rouillard <rouilj@ieee.org>
description Fix fix XSS issue in wsgi and cgi when handing url not found/404. issue2551035
files
Handle str/bytes issues for Python 3 for roundup.cgi. http://hg.code.sf.net:8000/p/roundup/code/#changeset-e0c83bf2e62826e601354a5a54de98a88b413feb Joseph Myers jsm@polyomino.org.uk 2018-09-15T22:16:26+00:00 2018-09-15T22:16:26+00:00
changeset e0c83bf2e628
branch
bookmark
tag
user Joseph Myers <jsm@polyomino.org.uk>
description Handle str/bytes issues for Python 3 for roundup.cgi.
files
Python 3 preparation: avoid string.join(). http://hg.code.sf.net:8000/p/roundup/code/#changeset-1ab2c81a64df050a52ab16121a0131882e6acef0 Joseph Myers jsm@polyomino.org.uk 2018-07-25T10:43:40+00:00 2018-07-25T10:43:40+00:00
changeset 1ab2c81a64df
branch
bookmark
tag
user Joseph Myers <jsm@polyomino.org.uk>
description Python 3 preparation: avoid string.join().
files
Python 3 preparation: avoid string.split(). http://hg.code.sf.net:8000/p/roundup/code/#changeset-86b6cea7a9752bc3caecd69f924796c73e904cc0 Joseph Myers jsm@polyomino.org.uk 2018-07-25T10:42:42+00:00 2018-07-25T10:42:42+00:00
changeset 86b6cea7a975
branch
bookmark
tag
user Joseph Myers <jsm@polyomino.org.uk>
description Python 3 preparation: avoid string.split().
files
Python 3 preparation: StringIO. http://hg.code.sf.net:8000/p/roundup/code/#changeset-55f09ca366c484e1c06dd34a4efead3f1634d7d7 Joseph Myers jsm@polyomino.org.uk 2018-07-25T09:08:29+00:00 2018-07-25T09:08:29+00:00
changeset 55f09ca366c4
branch
bookmark
tag
user Joseph Myers <jsm@polyomino.org.uk>
description Python 3 preparation: StringIO.

This generally arranges for StringIO and cStringIO references to use
io.StringIO for Python 3 but io.BytesIO for Python 2, consistent with
the string representations generally used in Roundup. A special
FasterStringIO in the TAL code, which referenced internals of the old
Python 2 StringIO module, is cut down so it doesn't actually do
anything beyond the StringIO class it inherits from (it would also be
reasonable to remove FasterStringIO completely). One place in
roundup_server.py clearly needing binary I/O is made to use io.BytesIO
unconditionally.
files
Python 3 preparation: miscellaneous Python scripts not named *.py. http://hg.code.sf.net:8000/p/roundup/code/#changeset-c75defc1c2f0e57786cd6be339eda3843b188969 Joseph Myers jsm@polyomino.org.uk 2018-07-25T00:36:40+00:00 2018-07-25T00:36:40+00:00
changeset c75defc1c2f0
branch
bookmark
tag
user Joseph Myers <jsm@polyomino.org.uk>
description Python 3 preparation: miscellaneous Python scripts not named *.py.
files
[routing] Remove PATH_INFO hacks that strip leading slash http://hg.code.sf.net:8000/p/roundup/code/#changeset-92757447dcf06c2e356680c8a296075f506ccb46 anatoly techtonik techtonik@gmail.com 2014-07-16T03:10:02+03:00 2014-07-16T03:10:02+03:00
changeset 92757447dcf0
branch routing
bookmark
tag
user anatoly techtonik <techtonik@gmail.com>
description Remove PATH_INFO hacks that strip leading slash

PATH_INFO should always start with '/' when not empty, see
http://tools.ietf.org/html/rfc3875#section-4.1.5
Instead, do leading slash stripping inside cgi.client
files
Fix typo http://hg.code.sf.net:8000/p/roundup/code/#changeset-52b0e416f0bc79fd1fc433c9d9e1ef5cdbc09b97 Ralf Schlatterbeck rsc@runtux.com 2013-03-07T09:49:50+01:00 2013-03-07T09:49:50+01:00
changeset 52b0e416f0bc
branch
bookmark
tag
user Ralf Schlatterbeck <rsc@runtux.com>
description Fix typo
files
Remove keyword expansions from CVS. All regression tests passed afterwards. http://hg.code.sf.net:8000/p/roundup/code/#changeset-6e3e4f24c75376f61ae0bf0e9ee334567585c38e Eric S. Raymond esr@thyrsus.com 2011-11-16T09:51:38-05:00 2011-11-16T09:51:38-05:00
changeset 6e3e4f24c753
branch
bookmark
tag
user Eric S. Raymond <esr@thyrsus.com>
description Remove keyword expansions from CVS. All regression tests passed afterwards.
files
frontends/roundup.cgi got out of sync with the roundup.cgi.Client API http://hg.code.sf.net:8000/p/roundup/code/#changeset-58306b1b01c912681f71d5cd00e00b38f8fc1ae7 Richard Jones richard@users.sourceforge.net 2010-04-19T00:39:01+00:00 2010-04-19T00:39:01+00:00
changeset 58306b1b01c9
branch
bookmark
tag
user Richard Jones <richard@users.sourceforge.net>
description frontends/roundup.cgi got out of sync with the roundup.cgi.Client API
files
Sorry for the mega-patch - was all done on the train: http://hg.code.sf.net:8000/p/roundup/code/#changeset-74aebbbea305d4b00ec9eb8c0008eb04215fed49 Richard Jones richard@users.sourceforge.net 2006-12-11T23:36:15+00:00 2006-12-11T23:36:15+00:00
changeset 74aebbbea305
branch
bookmark
tag
user Richard Jones <richard@users.sourceforge.net>
description Sorry for the mega-patch - was all done on the train:

- handling of required for booelan False and numeric 0 [SF#1608200]
- removed bogus args attr of ConfigurationError [SF#1608056]
- implemented start_response in roundup.cgi [SF#1604304]
files
WSGI support via roundup.cgi.wsgi_handler http://hg.code.sf.net:8000/p/roundup/code/#changeset-a2d22d0de0bc9f47f294ea6b456403ea90051e3a Richard Jones richard@users.sourceforge.net 2006-11-09T00:36:21+00:00 2006-11-09T00:36:21+00:00
changeset a2d22d0de0bc
branch
bookmark
tag
user Richard Jones <richard@users.sourceforge.net>
description WSGI support via roundup.cgi.wsgi_handler
files