1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00
Werner Koch fa1b1eaa42
dirmngr: Avoid possible CSRF attacks via http redirects.
* dirmngr/http.h (parsed_uri_s): Add fields off_host and off_path.
(http_redir_info_t): New.
* dirmngr/http.c (do_parse_uri): Set new fields.
(same_host_p): New.
(http_prepare_redirect): New.
* dirmngr/t-http-basic.c: New test.
* dirmngr/ks-engine-hkp.c (send_request): Use http_prepare_redirect
instead of the open code.
* dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
--

With this change a http query will not follow a redirect unless the
Location header gives the same host.  If the host is different only
the host and port is taken from the Location header and the original
path and query parts are kept.

Signed-off-by: Werner Koch <wk@gnupg.org>
2018-11-22 22:36:07 +01:00
..
2018-10-25 16:53:05 -04:00
2018-10-24 15:56:18 -04:00
2017-02-21 13:11:46 -05:00
2018-11-12 13:54:26 +01:00
2016-09-17 15:57:31 +09:00
2018-10-24 15:56:18 -04:00
2017-07-19 13:41:18 +09:00
2018-10-24 15:56:18 -04:00
2018-10-24 15:56:18 -04:00
2016-12-14 15:56:58 +01:00
2017-03-03 17:17:26 +01:00
2018-10-24 15:56:18 -04:00
2018-10-24 15:56:18 -04:00
2017-03-07 20:25:54 +09:00
2017-03-07 20:25:54 +09:00
2017-03-07 20:25:54 +09:00
2014-03-07 19:00:31 +01:00
2010-06-09 16:53:51 +00:00
2018-10-24 15:56:18 -04:00
2018-11-05 09:00:02 +01:00
2018-10-24 15:56:18 -04:00
2010-06-09 16:53:51 +00:00
2011-02-04 12:57:53 +01:00
2018-10-24 15:56:18 -04:00