php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11228 anonymous access incomlete authentication ( fopen() )
Submitted: 2001-05-31 19:22 UTC Modified: 2001-05-31 23:21 UTC
From: kluit at home dot nl Assigned:
Status: Closed Package: *Directory/Filesystem functions
PHP Version: 4.0.4pl1 OS: linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: kluit at home dot nl
New email:
PHP Version: OS:

 

 [2001-05-31 19:22 UTC] kluit at home dot nl
Using the fopen() command as fopen (ftp://url/file) logs on as user anonymous, but the password send in not a complete e-mail adres. My remote server declined acces. An fopen(ftp://anonymous:john@doe.com@server/file, r) does not work, resulting in a bad file description error.
I found my ISP server letting itself trick with john!doe.com
and fopen(anonymous:john!doe.com@server/file, r) is being correct interpreted by php.
Maybe it's an idea to include a full e-mail adres in anonymous access or to change the @ separater to something else?

gr. robin

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-31 23:21 UTC] sniper@php.net
You have to use urlencode() on the password:

<?php

$passwd=urlencode("sniper@php.net");

$fp=fopen("ftp://anonymous:".$passwd."@ftp.funet.fi/pub/README", "r");

echo fread($fp, 100);
fclose($fp);

?>

OR you can use the undocumented 'from' directive in php.ini
to set your default anonymous ftp/http server password:

from="sniper@iki.fi"

--Jani

 [2001-05-31 23:21 UTC] sniper@php.net
I now added the 'from' directive example into php.ini-dist
file which is distributed with the php sources.

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 20:01:29 2024 UTC