#
1af7d5f3 |
| 21-Aug-2024 |
Pietro Cerutti <gahr@FreeBSD.org> |
libfetch: don't include fragments in HTTP requests
Summary: Fragments are reserved for client-side processing, see https://www.rfc-editor.org/rfc/rfc9110.html#section-7.1
Also, some servers don't l
libfetch: don't include fragments in HTTP requests
Summary: Fragments are reserved for client-side processing, see https://www.rfc-editor.org/rfc/rfc9110.html#section-7.1
Also, some servers don't like to receive HTTP requests with fragments.
``` $ fetch 'https://dropbox.com/a/b' fetch: https://dropbox.com/a/b: Not Found
$ fetch 'https://dropbox.com/a/b#' fetch: https://dropbox.com/a/b#: Bad Request ```
This is a real-world scenario, where some download link from dropbox (eventually) redirects to an URL with a fragment:
``` $ fetch -v 'https://www.dropbox.com/sh/<some>/<thing>?dl=1' 2>&1 | grep requesting requesting https://www.dropbox.com/sh/<some>/<thing>?dl=1 requesting https://www.dropbox.com/scl/fo/<foo>/<bar>?rlkey=<baz>&dl=1 requesting https://<boo>.dl.dropboxusercontent.com/zip_download_get/<some-long-strig># ```
See how the last redirect ends with a `#`.
Currently, libfetch includes the ending fragment and makes it impossible to download the file.
Differential Revision: https://reviews.freebsd.org/D46318 MFC after: 2 weeks
show more ...
|
#
8cd71a0e |
| 11-Jul-2024 |
Ka Ho Ng <khng@FreeBSD.org> |
libfetch: parse IPv4address in IPv6address properly
This fix parsing problems of IPv6 addresses which contains IPv4 addresses. One example is ::192.168.0.1.
Documents are in below: https://datatrac
libfetch: parse IPv4address in IPv6address properly
This fix parsing problems of IPv6 addresses which contains IPv4 addresses. One example is ::192.168.0.1.
Documents are in below: https://datatracker.ietf.org/doc/html/rfc2373#page-22
Sponsored by: Juniper Networks, Inc. MFC after: 1 week Reviewed by: jhibbits Differential Revision: https://reviews.freebsd.org/D45896
show more ...
|
Revision tags: release/14.1.0 |
|
#
fb860ed0 |
| 25-Mar-2024 |
Ka Ho Ng <khng@FreeBSD.org> |
libfetch: parse scheme://domain:/ correctly
This improves URL-parsing compability with cURL, and unbreaks parsing of similar kinds of URLs after commit 8d9de5b10a24.
Sponsored by: Juniper Networks,
libfetch: parse scheme://domain:/ correctly
This improves URL-parsing compability with cURL, and unbreaks parsing of similar kinds of URLs after commit 8d9de5b10a24.
Sponsored by: Juniper Networks, Inc. Reviewed by: des MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D44493
show more ...
|
Revision tags: release/13.3.0 |
|
#
a2f733ab |
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
lib: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remov
lib: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
Sponsored by: Netflix
show more ...
|
Revision tags: release/14.0.0 |
|
#
1d386b48 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0, release/13.0.0, release/12.2.0, release/11.4.0 |
|
#
bc02c18c |
| 07-Feb-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r357408 through r357661.
|
#
83372bda |
| 05-Feb-2020 |
Ed Maste <emaste@FreeBSD.org> |
libfetch: disallow invalid escape sequences
Per RFC1738 escape is "% hex hex"; other sequences do not form a valid URL.
Suggested by: Matthew Dillon Reviewed by: Matthew Dillon MFC after: 1 week
|
#
bb1d0df5 |
| 29-Jan-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r357179 through r357269.
|
#
6fb3f994 |
| 28-Jan-2020 |
Gordon Tetlow <gordon@FreeBSD.org> |
Fix urldecode buffer overrun.
Reported by: Duncan Overbruck Security: CVE-2020-7450
|
Revision tags: release/12.1.0, release/11.3.0 |
|
#
67350cb5 |
| 09-Dec-2018 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r340918 through r341763.
|
Revision tags: release/12.0.0 |
|
#
8d9de5b1 |
| 27-Nov-2018 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
Improve URL parsing. In particular, convert scheme and host to lowercase.
MFC after: 1 week
|
Revision tags: release/11.2.0 |
|
#
5f04ebd4 |
| 29-May-2018 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
Fix an inverted conditional in the netrc code, which would ignore the value of $HOME and always use the home directory from the passwd database, unless $HOME was unset, in which case it would use (nu
Fix an inverted conditional in the netrc code, which would ignore the value of $HOME and always use the home directory from the passwd database, unless $HOME was unset, in which case it would use (null).
While there, clean up handling of netrcfd and add debugging aids.
MFC after: 3 weeks
show more ...
|
#
c5712d6d |
| 29-May-2018 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
Use __VA_ARGS__ to simplify the DEBUG macro.
MFC after: 3 weeks
|
#
5e53a4f9 |
| 26-Nov-2017 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
lib: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using mis-identified many licenses so this was mostly a manual - error pr
lib: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I was using mis-identified many licenses so this was mostly a manual - error prone - task.
The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts.
show more ...
|
Revision tags: release/10.4.0, release/11.1.0 |
|
#
08a49957 |
| 17-Mar-2017 |
Dag-Erling Smørgrav <des@FreeBSD.org> |
r308996 broke IP literals by assuming that a colon could only occur as a separator between host and port, and using strchr() to search for it. Rewrite fetch_resolve() so it handles bracketed literals
r308996 broke IP literals by assuming that a colon could only occur as a separator between host and port, and using strchr() to search for it. Rewrite fetch_resolve() so it handles bracketed literals correctly, and remove similar code elsewhere to avoid passing unbracketed literals to fetch_resolve(). Remove #ifdef INET6 so we still parse IP literals correctly even if we do not have the ability to connect to them.
While there, fix an off-by-one error which caused HTTP 400 errors to be misinterpreted as redirects.
PR: 217723 MFC after: 1 week Reported by: bapt, bz, cem, ngie
show more ...
|
#
5d1ce10b |
| 03-Mar-2017 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Properly initialize netrcfd in fetchParseURL
This fixes ftp with fetch(1) which was broken after r313974
Submitted by: dim Reported by: olivier Pointyhat to: bapt
|
#
6ae9acde |
| 23-Feb-2017 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r313896 through r314128.
|
#
d8713bf3 |
| 20-Feb-2017 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Add a file descriptor in struct url for netrc
When using libfetch in an application that drops privileges when fetching like pkg(8) then user complain because the application does not read anymore $
Add a file descriptor in struct url for netrc
When using libfetch in an application that drops privileges when fetching like pkg(8) then user complain because the application does not read anymore ${HOME}/.netrc. Now a caller can prepare a fd to the said file and manually assign it to the structure.
It is also a first step to allow to capsicumize libfetch applications
Reviewed by: allanjude, des Approved by: des Differential Revision: https://reviews.freebsd.org/D9678
show more ...
|
Revision tags: release/11.0.1, release/11.0.0, release/10.3.0, release/10.2.0, release/10.1.0, release/9.3.0, release/10.0.0 |
|
#
0bfd163f |
| 18-Oct-2013 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Merge head r233826 through r256722.
|
Revision tags: release/9.2.0 |
|
#
d1d01586 |
| 05-Sep-2013 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Merge from head
|
#
40f65a4d |
| 07-Aug-2013 |
Peter Grehan <grehan@FreeBSD.org> |
IFC @ r254014
|
#
552311f4 |
| 17-Jul-2013 |
Xin LI <delphij@FreeBSD.org> |
IFC @253398
|
#
ceae90c2 |
| 05-Jul-2013 |
Peter Grehan <grehan@FreeBSD.org> |
IFC @ r252763
|
#
9bc22394 |
| 29-Jun-2013 |
Tim Kientzle <kientzle@FreeBSD.org> |
Fix -Wunsequenced warning.
Submitted by: dt71@gmx.com
|
Revision tags: release/8.4.0, release/9.1.0 |
|
#
6a068746 |
| 15-May-2012 |
Alexander Motin <mav@FreeBSD.org> |
MFC
|