1
我的xauth實現遇到了一個非常奇怪的錯誤。XAuth在密碼中包含「#」時失敗
密碼中包含「#」時失敗。我探聽出原始消息頭,它看起來幾乎一模一樣的另一個應用是工作,除了尋找不同的隨機數
我使用的代碼是在這裏(這很重要):http://pastie.org/2436098
--------MY LIBRARY :FAIL--------
POST /oauth/access_token HTTP/1.1
Host: api.twitter.com
User-Agent: onethingaday/1.0 CFNetwork/485.13.8 Darwin/10.7.0
Authorization: OAuth oauth_nonce="70943970", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1314400256", oauth_consumer_key="fmYDyQZ1IRz6sYuhOAQbJQ", oauth_signature="1VYDQYL5WvkbovQggNUjuY9t%2Fvc%3D", oauth_version="1.0"
Accept: */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded
Content-Length: 78
Connection: keep-alive
Proxy-Connection: keep-alive
x_auth_mode=client_auth&x_auth_username=kkklllkkk1&x_auth_password=kkkk%23kkkk
--------SNOOPING ANOTHER APP : SUCCESS--------
POST /oauth/access_token HTTP/1.1
Host: api.twitter.com
User-Agent: XAuthTwitterEngineDemo/1.0 CFNetwork/485.13.8 Darwin/10.7.0
Content-Length: 78
Content-Type: application/x-www-form-urlencoded
Authorization: OAuth realm="", oauth_consumer_key="fmYDyQZ1IRz6sYuhOAQbJQ", oauth_signature_method="HMAC-SHA1", oauth_signature="mEyjwksg1NoaY2VMQBf70ZN3OhM%3D", oauth_timestamp="1314400386", oauth_nonce="4DF9C426-08F8-49FC-9E1B-576FDBDA8836", oauth_version="1.0"
Accept: */*
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: keep-alive
Proxy-Connection: keep-alive
x_auth_mode=client_auth&x_auth_username=kkklllkkk1&x_auth_password=kkkk%23kkkk
謝謝傑里米一個驚人的答案!我怎麼把這兩次調高一點?我最終扯掉了我的實現,並用這個:http://code.google.com/p/oauthconsumer/wiki/UsingOAuthConsumer –
只是證明你不應該在標準方面太聰明。 –