HTTP digest authentication fail due to wrong nonce-count in iOS 10

前端 未结 4 796
抹茶落季
抹茶落季 2021-01-07 04:29

HTTP digest authentication no longer works in our app since iOS 10 due to wrong nonce-count in Authorization: Digest header generated by NSURLSession.

The same code

4条回答
  •  灰色年华
    2021-01-07 05:11

    Chances are, the OS is sending a HEAD request first, and your server-side code isn't getting it. I would try running Charles Proxy to verify that this is what's happening.

    That said, skipping a nonce count is not inherently an indication of any sort of attack. It could occur even in iOS 9 if a request got lost somehow (e.g. a network error). What's important is to ensure that the count doesn't go backwards. So I would argue that your server code is buggy and should not be rejecting that to begin with.

提交回复
热议问题