Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > it.comp.www.php > #22287 > unrolled thread
| Started by | alex <1j9448a02@lnx159sneakemail.com.invalid> |
|---|---|
| First post | 2018-10-11 14:01 +0200 |
| Last post | 2018-10-11 15:44 +0100 |
| Articles | 4 — 2 participants |
Back to article view | Back to it.comp.www.php
user-agent obbligatorio alex <1j9448a02@lnx159sneakemail.com.invalid> - 2018-10-11 14:01 +0200
Re: user-agent obbligatorio Alessandro Pellizzari <shuriken@amiran.it> - 2018-10-11 13:07 +0100
Re: user-agent obbligatorio alex <1j9448a02@lnx159sneakemail.com.invalid> - 2018-10-11 15:18 +0200
Re: user-agent obbligatorio Alessandro Pellizzari <shuriken@amiran.it> - 2018-10-11 15:44 +0100
| From | alex <1j9448a02@lnx159sneakemail.com.invalid> |
|---|---|
| Date | 2018-10-11 14:01 +0200 |
| Subject | user-agent obbligatorio |
| Message-ID | <ppnebj$1cum$1@gioia.aioe.org> |
$ua = $_SERVER['HTTP_USER_AGENT']; Ma bisogna anche prevedere che l'user-agent non sia specificato, o tutti o browser sono obbligati ad inviarlo?
[toc] | [next] | [standalone]
| From | Alessandro Pellizzari <shuriken@amiran.it> |
|---|---|
| Date | 2018-10-11 13:07 +0100 |
| Message-ID | <g28souFc76U1@mid.individual.net> |
| In reply to | #22287 |
On 11/10/2018 13:01, alex wrote: > $ua = $_SERVER['HTTP_USER_AGENT']; > > Ma bisogna anche prevedere che l'user-agent non sia specificato, o tutti > o browser sono obbligati ad inviarlo? Come tutti i dati che arrivano dal client, non ti devi fidare. Può essere assente, vuoto, custom, corrotto, alterato da un proxy, un tentativo di DoS, ecc. ecc. Bye.
[toc] | [prev] | [next] | [standalone]
| From | alex <1j9448a02@lnx159sneakemail.com.invalid> |
|---|---|
| Date | 2018-10-11 15:18 +0200 |
| Message-ID | <ppnis9$1l56$1@gioia.aioe.org> |
| In reply to | #22288 |
Il 11/10/2018 14:07, Alessandro Pellizzari ha scritto:
> On 11/10/2018 13:01, alex wrote:
>
>> $ua = $_SERVER['HTTP_USER_AGENT'];
>>
>> Ma bisogna anche prevedere che l'user-agent non sia specificato, o
>> tutti o browser sono obbligati ad inviarlo?
>
> Come tutti i dati che arrivano dal client, non ti devi fidare.rii
>
> Può essere assente, vuoto, custom, corrotto, alterato da un proxy, un
> tentativo di DoS, ecc. ecc.
>
> Bye.
Ci sarebbe un sistema per certificare che il browser è inevocabilmente
firefox, chrome, safari, curl, wget, alex-browser (creato da me), ecc.
Tramite qualche forma di certificato, tramite l'identificazione del
processo, tramite qualche invio di stringhe (md5, chiavi...)
particolari, ecc.
if ($_SERVER['HTTP_USER_AGENT']=='alex-browser') {
// fai cose particolari
}
naturalmente non è un metodo affidabile
[toc] | [prev] | [next] | [standalone]
| From | Alessandro Pellizzari <shuriken@amiran.it> |
|---|---|
| Date | 2018-10-11 15:44 +0100 |
| Message-ID | <g295uoF27rgU1@mid.individual.net> |
| In reply to | #22289 |
On 11/10/2018 14:18, alex wrote: > Ci sarebbe un sistema per certificare che il browser è inevocabilmente > firefox, chrome, safari, curl, wget, alex-browser (creato da me), ecc. No. Per questo motivo il browser-sniffing è stato abbandonato diversi anni fa. Bye.
[toc] | [prev] | [standalone]
Back to top | Article view | it.comp.www.php
csiph-web