5

PHPSESSID Cookieの命名に関するベストプラクティスは何ですか?Symfony2では、設定を介してこれを変更できます。また、php.iniのsession.nameで変更することもできます。

なぜあなたはしたいのですか?

4

2 に答える 2

10

It allows you to run multiple applications on the same site that each need their own cookies to perpetuate the session id. Of course, the same could also be accomplished by setting the session cookie path and/or cookie domain properly.

Another reason could be that you want to hide the fact that you're using PHP and the name PHPSESSID is pretty indicative of that fact.

Or you just don't like the name; much up to you - the developer - to choose a pretty name if you want to.

于 2012-09-05T17:08:59.780 に答える
3

これは、一種の些細な「あいまいさによるセキュリティ」の実践と見なすこともできます。さまざまな HTTP フィンガープリンティング アプリケーションは、サーバー ヘッダー、ページ プレフィックス、セッション ID Cookie 名 (後で変更します)、および細工されたリクエストを受信したときの Web サーバーの動作を監視することにより、Web アプリケーションの実装に使用されるテクノロジを検出しようとします。

この種のものは Web アプリのセキュリティをほとんど向上させませんが、潜在的な攻撃者をだますために使用される可能性があります。ジャックの答えは、主な利点を指摘しています。

于 2012-09-05T17:17:36.960 に答える