During cookie verification today, I found that none of the verification methods were correct. The strange thing is that the previous verification was normal. This time, I only changed the value, after debugging, it is found that the value of a cookie in the browser is "lv502zeal75 + 9l5gjqhhdg =", but inProgram"Lv502zeal75 9l5gjqhhdg =" is read in. the plus sign in the original Cookie has been replaced with a space. Google searched for it and found that there is a help document on MS online, "ASP may improperly parse cookies containing a plus sign", but it is about ASP and iis4.0.
My Cookie is encrypted with DES because the plus sign does not appear in the previous value encryption number, and the plus sign appears when another value is changed later, resulting in verification failure.
Solution:
Encode the space with string. Replace ("+", "% 2B ")
During cookie verification today, I found that none of the verification methods were correct. The strange thing is that the previous verification was normal. This time, I only changed the value, after debugging, we found that the cookie value in the browser is "lv502zeal75 + 9l5gjqhhdg =", but what we read in the program is "lv502zeal75 9l5gjqhhdg = ", in the past, the plus sign in the cookie has been replaced by a space. Google searched and found that Ms has compiled this help document on the Internet, "ASP may improperly parse cookies containing a plus sign ", however, ASP and iis4.0.
My Cookie is encrypted with DES because the plus sign does not appear in the previous value encryption number, and the plus sign appears when another value is changed later, resulting in verification failure.
Solution:
Encode the space with string. Replace ("+", "% 2B ")