# About #37799

- Thread: https://externals.io/message/27211
- Original archive: https://news-web.php.net/php.internals/27211
- Started by Mehdi Achour on 2006-12-29T12:47:35+00:00
- Messages: 5
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #27211 — Mehdi Achour — 2006-12-29T12:47:35+00:00

URL: https://externals.io/message/27211#27211

Hello,

I had a look at http://bugs.php.net/37799 and I would really like to 
have a little warning added upon SSL connection failure.

 From my understanding, the silent fall back to a normal connection is 
made in ftp.c at line 269, which as the bug reporter says, "leads to a 
false sense of security".

Anyone ?

Best Regards,

Mehdi Achour

---

## #27212 — Pierre — 2006-12-29T13:35:00+00:00

URL: https://externals.io/message/27211#27212 · In reply to: #27211

Hello,


> Hello,
>
> I had a look at http://bugs.php.net/37799 and I would really like to
> have a little warning added upon SSL connection failure.
>
>  From my understanding, the silent fall back to a normal connection is
> made in ftp.c at line 269, which as the bug reporter says, "leads to a
> false sense of security".

I would instead make ftp_ssl_connect failing  and returns false. I
prefer functions without too much error messages for expected errors
(a network connection can fail, no need to raise a warning here). Then
let the user decides to try again using ftp_connect.

--Pierre

---

## #27213 — Nuno Lopes — 2006-12-29T14:41:47+00:00

URL: https://externals.io/message/27211#27213 · In reply to: #27212

> > […]
>
> I would instead make ftp_ssl_connect failing  and returns false. I
> prefer functions without too much error messages for expected errors
> (a network connection can fail, no need to raise a warning here). Then
> let the user decides to try again using ftp_connect.
>
> --Pierre

Yes, I have to agree here. I would also prefer returning false on failure 
(as other extensions do).

Nuno

P.S.: nice comeback, didou ;)

---

## #27216 — Mehdi Achour — 2006-12-29T23:52:34+00:00

URL: https://externals.io/message/27211#27216 · In reply to: #27213

Hi,

Nuno Lopes wrote:
> > […]
> 
> 
> Yes, I have to agree here. I would also prefer returning false on 
> failure (as other extensions do).
> 
> Nuno

Pierre, I completely agree, user should have a real error.
The problem is that ftp_ssl_connect doesn't really do the SSL 
connection. The silent switch is made when `ftp_login()` is called.
If we make anyone fail, it should be `ftp_login()` and that would make
sense.

Mehdi

---

## #28006 — Nuno Lopes — 2007-02-11T13:12:30+00:00

URL: https://externals.io/message/27211#28006 · In reply to: #27211

Is someone against I applying the following patch: 
http://mega.ist.utl.pt/~ncpl/php_ftp_ssl-w.txt (diff -w) in php 5_2/head 
branches?

Nuno


----- Original Message ----- 
> Hello,
>
> I had a look at http://bugs.php.net/37799 and I would really like to have 
> a little warning added upon SSL connection failure.
>
> From my understanding, the silent fall back to a normal connection is made 
> in ftp.c at line 269, which as the bug reporter says, "leads to a false 
> sense of security".
>
> Anyone ?
>
> Best Regards,
>
> Mehdi Achour
