=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ftp/fetch.c,v retrieving revision 1.167 retrieving revision 1.167.6.1 diff -c -r1.167 -r1.167.6.1 *** src/usr.bin/ftp/fetch.c 2018/02/10 06:25:16 1.167 --- src/usr.bin/ftp/fetch.c 2019/12/19 16:49:47 1.167.6.1 *************** *** 1,4 **** ! /* $OpenBSD: fetch.c,v 1.167 2018/02/10 06:25:16 jsing Exp $ */ /* $NetBSD: fetch.c,v 1.14 1997/08/18 10:20:20 lukem Exp $ */ /*- --- 1,4 ---- ! /* $OpenBSD: fetch.c,v 1.167.6.1 2019/12/19 16:49:47 deraadt Exp $ */ /* $NetBSD: fetch.c,v 1.14 1997/08/18 10:20:20 lukem Exp $ */ /*- *************** *** 240,245 **** --- 240,248 ---- #endif /* !NOSSL */ } else errx(1, "url_get: Invalid URL '%s'", newline); + + if (isfileurl && redirect_loop > 0) + errx(1, "Redirection to local file not permitted"); if (isfileurl) { path = host;