Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 816

1 (edited by qwertyuiop 2013-10-09 18:22:12)

Topic: Del prisijungimo su sesija

Sveiki, yra du variantai kaip sugalvojau padaryti prisijungima prie puslapio:

1 variantas:
vartotojas suveda duomenis prisijungimo formoje ir nuspaudzia prisijungti;
jeigu duomenys teisingi, sukuriama sesija ($_SESSION['vartotojas']=jo_id; $_SESSION['apsauga']='slaptazodzio_hashas';);
kaskart kai vartotojas atvercia koki pulapi, prisijungiama prie duomenu bazes ir patikrinama ar duomenys sutampa (SELECT `slaptazodis` WHERE `vartotojo_id`=".$_SESSION['vartotojo_id']." LIMIT 1);
jei slaptazodzio hashas is DB sutampa su $_SESSION['apsauga'], viskas OK;

2 variantas:
vartotojas suveda duomenis prisijungimo formoje ir nuspaudzia prisijungti;
jeigu duomenys teisingi, sukuriama sesija ($_SESSION['vartotojas']=jo_id;);
kaskart kai vartotojas atvercia koki pulapi, paimami duomenys is duomenu bazes (SELECT `norima_info` WHERE `vartotojo_id`=".$_SESSION['vartotojas']." LIMIT 1);

Kitaip sakant, ar reikia nuolat tikrinti prisijungima ar uztenka sukurti sesija po teisingai ivesto slaptazodzio ir nebetikrinti nuolat su DB? Is pirmo zvilgsnio, nematau prasmes tai daryti..

Re: Del prisijungimo su sesija

O iš kur ištraukei, kad reikia tikrinti hash'ą kiekvieną kartą?

MongoDB Certified Developer
MongoDB Certified DBA
Zend Certified Engineer

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 816

Re: Del prisijungimo su sesija

http://www.wikihow.com/Create-a-Secure- … -and-MySQL

4 (edited by zygis 2013-10-10 17:18:56)

Re: Del prisijungimo su sesija

Na ten tikslas ne slaptažodį tikrinti, o naršyklės user-agent...

MongoDB Certified Developer
MongoDB Certified DBA
Zend Certified Engineer

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 811

Deprecated: Function create_function() is deprecated in /home/pasokime/domains/mysql.lt/public_html/forumas/include/parser.php on line 816

5 (edited by qwertyuiop 2013-10-10 17:57:03)

Re: Del prisijungimo su sesija

Bet ar reikia nuolat tikrinti? Jeigu jau vartotojas suveda teisingus duomenis, sukuriu sesija ir viskas, manau (ir tiesiog tikrinu if(isset($_SESSION['sdf']))).

Re: Del prisijungimo su sesija

Ten yra apsauga nuo sesijos vagystės. Jei sesija sukurta su chrome, o naršo firefox - kažkas tikrai negerai.

MongoDB Certified Developer
MongoDB Certified DBA
Zend Certified Engineer

Re: Del prisijungimo su sesija

Na taip, tiesiog tam pavyzdi dar paima slaptazodi is duomenu bazes ir tik tada patikrina narsykle. Na, nezinau, as manau, kad nuolat tikrinti duomenis su duomenu baze nera jokios prasmes, nes jeigu jau perimsi sesija tai ir duomenys sutapts, o ir del narsykles, niekas netrugdys vagiui naudotis tokia pat narsykle.

Re: Del prisijungimo su sesija

SID reikia karts nuo karto regeneruoti
SID logus vesti
SID įdėti timeout
vienu žodžiu ir t.t

kitu žodžiu, ties vienu pavyzdžiu negalima apsiriboti, paimi 10pvz ir išvedi bendrą turinio esmės vidurkį, tada dings pointas "manyti" ;)

Kiek maigyklių sudėvėjai ?

Re: Del prisijungimo su sesija

Na, as SID perregeneruoju per kiekviena prisijungima ir, manau, uztenka tokios apsaugos :D