久久精品水蜜桃av综合天堂,久久精品丝袜高跟鞋,精品国产肉丝袜久久,国产一区二区三区色噜噜,黑人video粗暴亚裔

WordPress: WordPress Cookies:修訂間差異

來自站長百科
跳轉至: 導航、? 搜索
無編輯摘要
無編輯摘要
第1行: 第1行:
__TOC__
__TOC__
WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.


WordPress 使用cookies, 或者說是小的信息儲存在你的電腦中,來驗證你是誰。有登陸的cookies,也有發(fā)表評論用的cookies。
WordPress 使用cookies, 或者說是小的信息儲存在你的電腦中,來驗證你是誰。有登陸的cookies,也有發(fā)表評論用的cookies。
==Users==
Users are those people who have registered an account with the WordPress blog in question.


==用戶==
==用戶==


用戶是那些已經注冊一個帳戶,擁有WordPress blog的人。
用戶是那些已經注冊一個帳戶,擁有WordPress blog的人。
When you log into WordPress from <tt><nowiki>http://example.com/wp-login.php</nowiki></tt>, WordPress stores the following two cookies:
* Your user name
* A double-hashed copy of your password
The cookies are set to expire one year from the time they are set.


當你從<tt><nowiki>http://example.com/wp-login.php</nowiki></tt>登陸WordPress時,WordPress儲存了如下兩個cookies:
當你從<tt><nowiki>http://example.com/wp-login.php</nowiki></tt>登陸WordPress時,WordPress儲存了如下兩個cookies:
第23行: 第11行:
* 你的用戶名
* 你的用戶名
* 加密過的密碼副本
* 加密過的密碼副本
The cookies are set to expire one year from the time they are set.
The actual cookies contain ''hashed'' data, so you don't have to worry about someone gleaning your username and password by reading the cookie data.? A ''hash'' is the result of a specific mathematical formula applied to some input data (in this case your user name and password, respectively).? It's quite hard to reverse a hash (bordering on practical infeasibility with today's computers).? This means it is very difficult to take a hash and "unhash" it to find the original input data.


cookies 設置成從建立之日起一年后失效。
cookies 設置成從建立之日起一年后失效。


實際上cookies包括''加密的'' 數(shù)據(jù), 所以你不用擔心有人通過閱讀cookie發(fā)現(xiàn)你的用戶名和密碼。 ''加密''是一種特殊的數(shù)學算法的結果,應用于某種輸入數(shù)據(jù) (本文中是你的用戶名和密碼)。很難將一個加密過的內容反轉成文本 (使用現(xiàn)有的電腦進行過實踐的可行性)。這意味這它很難"反加密" 得到原始輸入數(shù)據(jù)。
實際上cookies包括''加密的'' 數(shù)據(jù), 所以你不用擔心有人通過閱讀cookie發(fā)現(xiàn)你的用戶名和密碼。 ''加密''是一種特殊的數(shù)學算法的結果,應用于某種輸入數(shù)據(jù) (本文中是你的用戶名和密碼)。很難將一個加密過的內容反轉成文本 (使用現(xiàn)有的電腦進行過實踐的可行性)。這意味這它很難"反加密" 得到原始輸入數(shù)據(jù)。
WordPress uses the two cookies to bypass the password entry portion of <tt>wp-login.php</tt>.? If WordPress recognizes that you have valid, non-expired cookies, you go directly to the WordPress [[WordPress:Administration Panels|Administration]] interface.? If you don't have the cookies, or they're expired, or in some other way invalid (like you edited them manually for some reason), WordPress will require you to log in again, in order to obtain new cookies.


WordPress使用兩種cookies來隱藏<tt>wp-login.php</tt>的密碼輸入部分。如果 WordPress 認為你是合法的,沒有過期的cookies,你可以直接進入WordPress [[WordPress:Administration Panels|管理]]界面。如果你沒有這個cookies,或者是已經過期,或者其他原因而導致不合法的話,(如你手動編輯過它們),WordPress 將會要求你重新登陸以獲得新的cookies。
WordPress使用兩種cookies來隱藏<tt>wp-login.php</tt>的密碼輸入部分。如果 WordPress 認為你是合法的,沒有過期的cookies,你可以直接進入WordPress [[WordPress:Administration Panels|管理]]界面。如果你沒有這個cookies,或者是已經過期,或者其他原因而導致不合法的話,(如你手動編輯過它們),WordPress 將會要求你重新登陸以獲得新的cookies。
The functions to set and remove cookies are currently defined in <tt>/wp-includes/pluggable-functions.php</tt>.
;<tt><nowiki>wp_setcookie($username, $password, $already_md5 = false, $home = '', $siteurl = '')</nowiki></tt> :This function sets the cookie.
;<tt>wp_clearcookie()</tt> :This function will delete the cookie from the client browser.? This happens when the user clicks on the <strong>Logout</strong> link in the [[WordPress:Administration Panels|Administration]] interface.
The following function also utilizes the cookies:
;<tt>auth_redirect()</tt> :Checks whether the cookie is present on the client browser.? If it <em>is not</em>, the user is sent to the <tt>wp-login.php</tt> login screen.? After logging in, the user is sent back to the page he or she attempted to access.


設置和移動cookies的函數(shù)目前定義在 <tt>/wp-includes/pluggable-functions.php</tt>文件內。
設置和移動cookies的函數(shù)目前定義在 <tt>/wp-includes/pluggable-functions.php</tt>文件內。
第53行: 第26行:


;<tt>auth_redirect()</tt> :查看cookie是否應用在客戶端瀏覽器中。如果<em>沒有</em>,用戶就會被鏈接到<tt>wp-login.php</tt>登陸界面。在登陸之后,用戶可以回到剛才想進入的頁面。 ?
;<tt>auth_redirect()</tt> :查看cookie是否應用在客戶端瀏覽器中。如果<em>沒有</em>,用戶就會被鏈接到<tt>wp-login.php</tt>登陸界面。在登陸之后,用戶可以回到剛才想進入的頁面。 ?
==Commenters==
When visitors comment on your blog, they too get cookies stored on their computer.? This is purely a convenience, so that the visitor won't need to re-type all their information again when they want to leave another comment.? Three cookies are set for commenters:
* <tt>comment_author</tt>
* <tt>comment_author_email</tt>
* <tt>comment_author_url</tt>
Again, all the data in the cookies is stored hashed.? When the visitor returns to your blog, WordPress checks for the existence of their cookie, and then tries to compare their hashed data with the values stored in the WordPress database.
The commenter cookies are set to expire a little under one year from the time they're set.


==評論者==
==評論者==
第78行: 第39行:
評論者cookies設置成略少于一年的時間過期。
評論者cookies設置成略少于一年的時間過期。


==References==
* [http://en.wikipedia.org/wiki/HTTP_cookie Wikipedia: Cookies]
* [http://wp.netscape.com/newsref/std/cookie_spec.html Netscape cookie specification]
* [http://www.faqs.org/rfcs/rfc2965 RFC2965]
* [http://www.php.net/manual/en/features.cookies.php PHP cookie documentation]


==參考==
==參考==

2008年5月13日 (二) 17:54的版本

WordPress 使用cookies, 或者說是小的信息儲存在你的電腦中,來驗證你是誰。有登陸的cookies,也有發(fā)表評論用的cookies。

用戶

用戶是那些已經注冊一個帳戶,擁有WordPress blog的人。

當你從http://example.com/wp-login.php登陸WordPress時,WordPress儲存了如下兩個cookies:

  • 你的用戶名
  • 加密過的密碼副本

cookies 設置成從建立之日起一年后失效。

實際上cookies包括加密的 數(shù)據(jù), 所以你不用擔心有人通過閱讀cookie發(fā)現(xiàn)你的用戶名和密碼。 加密是一種特殊的數(shù)學算法的結果,應用于某種輸入數(shù)據(jù) (本文中是你的用戶名和密碼)。很難將一個加密過的內容反轉成文本 (使用現(xiàn)有的電腦進行過實踐的可行性)。這意味這它很難"反加密" 得到原始輸入數(shù)據(jù)。

WordPress使用兩種cookies來隱藏wp-login.php的密碼輸入部分。如果 WordPress 認為你是合法的,沒有過期的cookies,你可以直接進入WordPress 管理界面。如果你沒有這個cookies,或者是已經過期,或者其他原因而導致不合法的話,(如你手動編輯過它們),WordPress 將會要求你重新登陸以獲得新的cookies。

設置和移動cookies的函數(shù)目前定義在 /wp-includes/pluggable-functions.php文件內。

wp_setcookie($username, $password, $already_md5 = false, $home = '', $siteurl = '')
這個函數(shù)設置cookie.
wp_clearcookie()
這個函數(shù)會從客戶瀏覽器中刪除cookie。當用戶點擊管理界面中的Logout鏈接時執(zhí)行。

下面幾種函數(shù)也用到cookies:

auth_redirect()
查看cookie是否應用在客戶端瀏覽器中。如果沒有,用戶就會被鏈接到wp-login.php登陸界面。在登陸之后,用戶可以回到剛才想進入的頁面。

評論者

當訪問者在你的blog上留下評論時,他們也會存儲cookies到他們的電腦上。 這非常方便,這樣當訪問者想留下另外一個評論的時候,不需要重新輸入他們所有的信息。有三個cookies是關于評論者的:

  • comment_author
  • comment_author_email
  • comment_author_url

所有存儲在cookies中的數(shù)據(jù)都是經過加密的。當訪問者返回你的blog時, WordPress 查看他們的cookie是否存在,然后試著用儲存在WordPress數(shù)據(jù)庫中的數(shù)據(jù)與加密過的信息比較。

評論者cookies設置成略少于一年的時間過期。


參考