Yuav Sau Tsab Ntawv Hauv Lub Vev Xaib Li Cas

Cov txheej txheem:

Yuav Sau Tsab Ntawv Hauv Lub Vev Xaib Li Cas
Yuav Sau Tsab Ntawv Hauv Lub Vev Xaib Li Cas

Video: Yuav Sau Tsab Ntawv Hauv Lub Vev Xaib Li Cas

Video: Yuav Sau Tsab Ntawv Hauv Lub Vev Xaib Li Cas
Video: Saib Tias Ntawm neeg lub cev (update) 23/4/2019 2024, Kaum ib hlis
Anonim

Cov ntawv rau ntawm lub xaib muaj ntau yam kev tswj hwm thiab tau siv los teeb tsa cov neeg siv kev sib raug zoo. Lub xub ntiag ntawm lub xaib ntawm daim foos tso cai rau tus neeg siv nkag mus thiab xa cov ntaub ntawv sau npe, cov lus thiab lwm yam ntaub ntawv. Ntxiv mus, daim foos yuav tsum tsis yog tsuas yog nyeem cov lus nkag mus, tab sis tseem ua nws nyob rau hauv ib txoj kev.

Yuav sau tsab ntawv hauv lub vev xaib li cas
Yuav sau tsab ntawv hauv lub vev xaib li cas

Nws yog qhov tsim nyog

daim ntawv sau

Cov Lus Qhia

Kauj ruam 1

Qhov nyuaj nyuaj hauv kev tsim daim ntawv yog ua kom muaj kev ruaj ntseg ntawm cov ntaub ntawv nkag mus rau lub xaib thiab lwm tus neeg siv. Ib qho kev txaus ntshai tshaj plaws yog qhov thiaj li hu ua XSS txhaj, qhov tseem ceeb ntawm qhov ntawd yog qhov ua tau rau kev ua txhaum txoj cai nyob hauv tus neeg siv lub browser. Yog li, daim foos yuav tsum muaj lub lim uas tsis pub nkag mus ntawm cov cim txaus ntshai lossis hloov rau lawv nrog kev tiv thaiv kev nyab xeeb hauv qhov sau tau sib txawv. Lub tshuab lim dej kuj tseem xav tau nyob rau lwm qhov xwm txheej - piv txwv li, hauv thaj teb rau kev nkag mus hauv chaw nyob e-mail, tej zaum yuav muaj lub lim rau nkag rau cov cim hauv ib qho kev teeb tsa, tshwj tsis yog lus Askiv.

Kauj ruam 2

Daim ntawv yog siv hauv tsab ntawv sau hauv ib qho ntawm cov lus sau, feem ntau PHP feem ntau siv. Daim foos tso cai tuaj yeem nkag mus rau hauv lub xaib hauv ob txoj kev: ncaj qha rau ntawm nplooj ntawv nplooj ntawv thiab hauv lwm daim ntawv txuas nrog. Hauv thawj kis, txoj cai siv tau ua nrog ntawm cim (tsis muaj suav nqi). Cov nplooj ntawv txuas ntxiv yuav tsum yog *.php. Yog tias nplooj ntawv muaj qhov txuas ntxiv *.html lossis *.htm, koj tsuas yog xav hloov nws rau *.php. Tus neeg rau zaub mov tuaj yeem tsim kho los ua cov ntaub ntawv php nrog cov txuas ntxiv; hauv qhov no, tsis tas yuav hloov chaw txuas ntxiv.

Kauj ruam 3

Yog hais tias tsab ntawv nthuav tawm raws li nyias muaj nyias cov ntawv, sib txuas sib txuas ntawm daim ntawv yuav tsum ua rau nws hauv nplooj ntawv nplooj:. Yog tias cov nplooj ntawv ntawm koj lub xaib muaj *.html txuas ntxiv, tom qab ntawd hloov nws mus *.php lossis tsim.htaccess cov ntaub ntawv hauv lub vev xaib (nrog rau lub sijhawm nyob rau hauv pem hauv ntej ntawm lub npe), tom qab ntawd ntxiv kab AddHandler application / x -httpd-php.html.htm”(tsis muaj npe).

Kauj ruam 4

Koj tuaj yeem sau cov ntawv sau tsab ntawv rau koj tus kheej, tab sis nws yooj yim dua los nrhiav cov ntawv npaj tsim nyob rau hauv net thiab hloov kho nws raws li xav tau. Nws yog qhov zoo tshaj rau saib cov cai ntawm ob peb txoj kev xaiv, ntsuas lawv qhov zoo thiab qhov tsis zoo. Thaum koj nkag siab li cas tsab ntawv sau tsim, koj tuaj yeem hloov nws qhov koj nyiam, lossis tsim koj tus kheej raws li cov qauv ntawm cov ntawv sau uas twb muaj lawm.

Pom zoo: