summaryrefslogtreecommitdiffstats
path: root/lib/python/web_support.py
Commit message (Collapse)AuthorAgeFilesLines
* web_support: call parse_qs from urllibEmilio Pozuelo Monfort2021-04-301-1/+6
| | | | The one from cgi has been removed in Python 3.8.
* web_support: fix memory leak with Python 3Emilio Pozuelo Monfort2020-08-111-1/+1
| | | | | | | ThreadingMixIn keeps a list of all non-deamon threads since Python 3.7, which prevents all the resources from being freed. Daemonize them so that we don't keep their resources forever, eventually causing OOM.
* web_support: make_list requires a list argumentEmilio Pozuelo Monfort2020-08-061-1/+1
|
* web_support.py: make_list: don't subscript the listEmilio Pozuelo Monfort2020-07-291-5/+5
| | | | | | We may get objects that are not subscriptable in py3, such as map objects, so just iterate over the whole object and pop the last separator instead.
* web_support.py: adapt urllib.quote for python3Emilio Pozuelo Monfort2020-07-291-3/+7
|
* web_support.py: decode data when necessaryEmilio Pozuelo Monfort2020-07-291-1/+8
| | | | We can't pass bytes under python3
* web_support.py: adapt HTTPServer imports for python3Emilio Pozuelo Monfort2020-07-291-5/+9
|
* web_support.py: adapt StringIO for python3Emilio Pozuelo Monfort2020-07-291-7/+11
|
* lib/python: replace tabs with spacesEmilio Pozuelo Monfort2020-07-291-1/+1
|
* web_support.py: fix octal numbers under py3Emilio Pozuelo Monfort2020-07-291-1/+1
|
* lib/python: use isinstance rather than typesEmilio Pozuelo Monfort2020-07-291-11/+13
| | | | types.TypeFoo are gone in python3.
* Add basic Unicode support to the web frameworkFlorian Weimer2020-05-011-20/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As mentioned in Debian bug #959231 ("security-tracker: Proxy Error on CVE-2020-11565 tracker page"): * Florian Weimer: > * Francesco Poli: > >> Please note that the CVE is mentioned in [DSA-4667-1]. >> >> [DSA-4667-1]: <https://lists.debian.org/debian-security-announce/2020/msg00071.html> >> >> What's wrong with that tracker page? > > It's something in the NVD data that breaks the HTML escaping. This patch adds basic Unicode support to the web framework. I'm not sure if it is the right direction to move in, but it fixes the issue. An alternative fix would be to change the NVD importer not to put Unicode strings into the database, by encoding them as byte strings first. [carnil: Slightly rewrite the commit message] BugLink: https://bugs.debian.org/929228 BugLink: https://bugs.debian.org/959231 Signed-off-by: Florian Weimer <fw@deneb.enyo.de> Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
* Replace `abc` with repr(abc)Brian May2019-02-181-4/+4
|
* Replace "x.has_key(y)" with "y in x" syntaxBrian May2018-08-201-5/+5
|
* Replace <> with != for Python 3.6 compatibilityBrian May2018-07-151-7/+7
|
* Update python exception syntax for Python 3.6 compatibilityBrian May2018-07-131-7/+7
|
* Merge branch 'jcristau/security-tracker-head'Salvatore Bonaccorso2018-07-071-2/+5
|\
| * lib: add support for the HEAD HTTP methodJulien Cristau2018-07-061-2/+5
| | | | | | | | Fixes security-tracker-team/security-tracker#3
* | Also set Content-Length for HTMLResultJulien Cristau2018-07-061-0/+1
|/
* Set Content-Length for BinaryResultJulien Cristau2018-07-061-0/+1
|
* lib: add "headers" attribute on Result objectsJulien Cristau2018-07-061-31/+26
| | | | Make it possible to set arbitrary headers when returning a Result.
* embedd all notes in <span> tagsHolger Levsen2014-12-011-1/+1
| | | | git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@30469 e39458fd-73e7-0310-bf30-c45bca0a0e42
* lib/python/web_support.py (ThreadingHTTPServer): Actually enable threadingFlorian Weimer2014-11-291-2/+2
| | | | | | | | The order of inheritance matters. With the previous order, the threading mix-in was effectively ignored. git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@30431 e39458fd-73e7-0310-bf30-c45bca0a0e42
* use labels instead of spans in filter checkbox areaUlrike Uhlig2014-09-221-0/+2
| | | | git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@28965 e39458fd-73e7-0310-bf30-c45bca0a0e42
* move javascript code into external fileHolger Levsen2014-09-201-2/+2
| | | | git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@28928 e39458fd-73e7-0310-bf30-c45bca0a0e42
* fix tpyos ;)Holger Levsen2014-09-171-2/+2
| | | | git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@28881 e39458fd-73e7-0310-bf30-c45bca0a0e42
* web view: move H2 generation into make_table(), so empty tables won'tHolger Levsen2014-09-161-4/+6
| | | | | | have a headline. git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@28835 e39458fd-73e7-0310-bf30-c45bca0a0e42
* use nav element for menu on homepage. add some css for nav and pre elements, ↵Ulrike Uhlig2014-09-151-21/+23
| | | | | | improve h1. git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@28803 e39458fd-73e7-0310-bf30-c45bca0a0e42
* use lists instead of tables where there is no tabular dataUlrike Uhlig2014-09-151-0/+2
| | | | git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@28801 e39458fd-73e7-0310-bf30-c45bca0a0e42
* use modern html5 css. switch to external stylesheet.Ulrike Uhlig2014-09-151-2/+10
| | | | git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@28798 e39458fd-73e7-0310-bf30-c45bca0a0e42
* tracker_service.py: add support for external css filesHolger Levsen2014-09-151-3/+3
| | | | git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@28797 e39458fd-73e7-0310-bf30-c45bca0a0e42
* Show URLs in TODO/NOTE as hyperlinks in the web view. (Closes: #610220)Holger Levsen2014-09-151-6/+15
| | | | git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@28796 e39458fd-73e7-0310-bf30-c45bca0a0e42
* web_support: Pass down https:// URLs to sever redirectsFlorian Weimer2014-03-171-9/+24
| | | | | | | | | This is required because security-tracker.debian.org sets STS and redirects to HTTPS, and recent Firefox versions do not handle http:// redirects in this context. git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@26143 e39458fd-73e7-0310-bf30-c45bca0a0e42
* Link to OSVDB and EDB search pages for the CVEPaul Wise2013-06-061-0/+5
| | | | git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@22511 e39458fd-73e7-0310-bf30-c45bca0a0e42
* web_support.URLFactory._convertArgs: correct thinkoFlorian Weimer2013-05-281-1/+1
| | | | | | | | We need to skip wrapping for lists and tuples, but wrap string and unicode objects. git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@22386 e39458fd-73e7-0310-bf30-c45bca0a0e42
* web_support.URLFactory._convertArgs: handle both lists of values and stringsFlorian Weimer2013-05-281-2/+5
| | | | | | | urllib.urlquote in Python 2.6 is more picky about its argument. git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@22380 e39458fd-73e7-0310-bf30-c45bca0a0e42
* "linkify" links in notesRaphael Geissert2010-01-111-0/+20
| | | | | | | it should later be extended to turn CVE- strings into links too git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@13784 e39458fd-73e7-0310-bf30-c45bca0a0e42
* lib/python/web_support.py (BinaryResult_later): call end_headers()Florian Weimer2009-10-111-0/+1
| | | | git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@12987 e39458fd-73e7-0310-bf30-c45bca0a0e42
* lib/python/web_support.py (WebServiceHttp): implement HTTP invocationFlorian Weimer2009-10-111-0/+111
| | | | | | | Introduces flatten_later helper methods in Result objects. git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@12984 e39458fd-73e7-0310-bf30-c45bca0a0e42
* lib/python/web_support.py (WebServiceBase): new classFlorian Weimer2009-10-111-10/+15
| | | | | | | | Factored common functionality into base class, in preparation of alternative invocation methods. git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@12983 e39458fd-73e7-0310-bf30-c45bca0a0e42
* lib/python/web_support.py: Include server port in generated URLsFlorian Weimer2008-12-011-0/+3
| | | | | | This allows us to run the service on a non-default port. git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@10567 e39458fd-73e7-0310-bf30-c45bca0a0e42
* lib/python/web_support.py: one more typing fix for Python 2.5Florian Weimer2008-12-011-2/+4
| | | | | | We suddenly have to deal with additional Unicode strings. git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@10566 e39458fd-73e7-0310-bf30-c45bca0a0e42
* lib/python/web_support.py (URLFactory.updateParamsDict):Florian Weimer2006-04-231-1/+1
| | | | | | | Fix. git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@3857 e39458fd-73e7-0310-bf30-c45bca0a0e42
* lib/python/web_support.py (URLFactory.updateParamsDict):Florian Weimer2006-04-231-1/+3
| | | | | | | | | New method. (URLFactory.updateParams): Implement using updateParamsDict. git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@3856 e39458fd-73e7-0310-bf30-c45bca0a0e42
* lib/python/web_support.py (make_numbered_list):Florian Weimer2006-03-111-0/+9
| | | | | | | New function. git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@3593 e39458fd-73e7-0310-bf30-c45bca0a0e42
* lib/python/web_support.py (BinaryResult):Florian Weimer2005-12-151-0/+15
| | | | | | | New class. git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@3050 e39458fd-73e7-0310-bf30-c45bca0a0e42
* lib/python/web_support.py (make_pre);Florian Weimer2005-10-201-1/+2
| | | | | | | | | | Fix bug which caused make_pre to include only the last element of the passed list in its output. (__test); Regression test. git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@2509 e39458fd-73e7-0310-bf30-c45bca0a0e42
* r772@deneb: fw | 2005-10-20 10:41:31 +0200Florian Weimer2005-10-201-9/+23
| | | | | | | | | lib/python/web_support.py (URLFactory.updateParams): New method. (charToHTML, charToHTMLattr): Replaces stringToHTML. git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@2490 e39458fd-73e7-0310-bf30-c45bca0a0e42
* r637@deneb: fw | 2005-10-14 15:38:48 +0200Florian Weimer2005-10-201-1/+3
| | | | | | | | | lib/python/web_support.py (EM): New. (CODE): Accept multiple arguments. git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@2487 e39458fd-73e7-0310-bf30-c45bca0a0e42
* r627@deneb: fw | 2005-10-14 10:33:41 +0200Florian Weimer2005-10-201-2/+5
| | | | | | | lib/python/web_support.py (RedirectResult): Support non-permanent redirections. git-svn-id: svn+ssh://svn.debian.org/svn/secure-testing@2484 e39458fd-73e7-0310-bf30-c45bca0a0e42

© 2014-2024 Faster IT GmbH | imprint | privacy policy