相关疑难解决方法(0)

哪些浏览器支持HttpOnly cookie?

哪些浏览器支持HttpOnly cookie,以及哪个版本?

有关HttpOnly cookie和XSS-prevention的讨论,请访问http://www.codinghorror.com/blog/archives/001167.html.

browser security cookies xss httponly

38
推荐指数
2
解决办法
2万
查看次数

命名PHP可选参数?

在PHP 4/5中是否可以在调用时指定一个命名的可选参数,跳过你不想指定的参数(比如在python中)?

就像是:

function foo($a,$b='', $c='') {
    // whatever
}


foo("hello", $c="bar"); // we want $b as the default, but specify $c
Run Code Online (Sandbox Code Playgroud)

谢谢

php default-value

21
推荐指数
3
解决办法
9224
查看次数

我如何保护PHP表单?

我没有运行关键任务网站,所以我不是在寻找工业强度解决方案.但是,我想防止基本攻击,例如有人嘲笑硬盘上的虚假页面并试图获得未经授权的访问.是否有任何标准技术可确保仅从合法用途接受表单提交?

php security

3
推荐指数
2
解决办法
1万
查看次数

PHP Session更安全还是SetCookie?

什么位更安全?

   function login_customer($customer_details) {
    //Set a cookie to login the customer
    setcookie("Str_CUST_LOGIN", 1, time()+3600);
    setcookie("Str_CUST_EMAIL", $customer_details['customers_email']);
    setcookie("Str_CUST_ID", $customer_details['customers_id']);
    //Update the cart
    return true;
}
Run Code Online (Sandbox Code Playgroud)

或者是下面这个.该脚本使用IF ELSE语句.老客户的梦魇应用.

   function login_customer($customer_details) {
    //Set a cookie to login the customer    
    $str_HA_CUST_LOGIN="1";
    // the customer details var gets info from a mysql escape form
    // so mysql /xss is stopped
    $str_HA_CUST_EMAIL=$customer_details['customers_email'];
    $str_HA_CUST_ID=$customer_details['customers_id'];

    $_SESSION["loggedIn"]=$str_HA_CUST_LOGIN;
    $_SESSION["userEmail"]=$str_HA_CUST_EMAIL;
    $_SESSION["userID"]=$str_HA_CUST_ID;

    return true;
}
Run Code Online (Sandbox Code Playgroud)

我正在努力改进它并锁定会话.没有做任何Salt,基于MD5的会话字符串,因为我正在考虑数据库会话 - 这里唯一的问题是MySQL是如此过载我们必须在云服务器上制作主和集群负载均衡器.在一天中每秒平均订单超过200个.所以我想要会议?

php security session

-1
推荐指数
1
解决办法
2898
查看次数

标签 统计

php ×3

security ×3

browser ×1

cookies ×1

default-value ×1

httponly ×1

session ×1

xss ×1