Visualizzazione dei risultati da 1 a 7 su 7
  1. #1
    Utente di HTML.it
    Registrato dal
    Jun 2004
    Messaggi
    32

    [PHP - Sicurezza] Da che sito arriva l'utente?

    Ciao a tutti!

    Allora ho un problemuccio... Ho un autosurf ad investimento (se lo sapete ok, se non lo sapete non penso che importi molto). Quando qualcuno vuole investire (usando E-Gold), viene mandato al sito di E-Gold. Poi, una volta che ha fatto il pagamento viene automaticamente rediretto sul mio sito dove uno script gli accredita automaticamente l'investimento.

    Ieri qualcuno ha trovato un bug nello script ed ha imbrogliato questo sistema. Ora cerco un modo per scoprire, in PHP, da che sito sta arrivando l'utente

    Ho letto che è sconsigliato usare: $_ENV['HTTP_REFERRER']; oppure: $_SERVER['REMOTE_ADDR']; (lo script attualmente usa questo metodo). Quindi come posso fare?

    Ciao e grazie!
    “There are only 10 types of people in the world: those who understand binary and those who don't”
    "...now we just have to find the other 1000"

  2. #2
    Utente di HTML.it L'avatar di moskitoita
    Registrato dal
    Feb 2004
    Messaggi
    1,255
    Prova
    $_SERVER['HTTP_REFERER']

  3. #3
    Utente di HTML.it
    Registrato dal
    Sep 2002
    Messaggi
    460
    Il referrer non e' un metodo per gestire la sicurezza opportuno, visto che dipende dalla HTTP request, che e' generata dal client a suo piacimento. Puo' essere una primissima barriera, ma niente di piu'.
    There are 10 types of people in the world - those who understand binary and those who don't.

  4. #4
    Utente di HTML.it
    Registrato dal
    Jun 2004
    Messaggi
    32
    Originariamente inviato da moskitoita
    Prova
    $_SERVER['HTTP_REFERER']
    Da php.net:

    'HTTP_REFERER'

    The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted.
    “There are only 10 types of people in the world: those who understand binary and those who don't”
    "...now we just have to find the other 1000"

  5. #5
    Utente di HTML.it
    Registrato dal
    Jun 2004
    Messaggi
    32
    Originariamente inviato da frinkia
    Il referrer non e' un metodo per gestire la sicurezza opportuno, visto che dipende dalla HTTP request, che e' generata dal client a suo piacimento. Puo' essere una primissima barriera, ma niente di piu'.
    Hey abbiamo quasi la stessa firma!

    Ma quindi cosa si può usare?
    “There are only 10 types of people in the world: those who understand binary and those who don't”
    "...now we just have to find the other 1000"

  6. #6
    Utente di HTML.it
    Registrato dal
    Jun 2004
    Messaggi
    32
    up!
    “There are only 10 types of people in the world: those who understand binary and those who don't”
    "...now we just have to find the other 1000"

  7. #7
    Utente di HTML.it
    Registrato dal
    Jun 2004
    Messaggi
    32
    up!
    “There are only 10 types of people in the world: those who understand binary and those who don't”
    "...now we just have to find the other 1000"

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.