commit | f81d3dc3188d5c56aedf94e522393332e87abe26 | [log] [tgz] |
---|---|---|
author | Martin Kreichgauer <martinkr@google.com> | Tue Aug 14 22:11:09 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Tue Aug 14 22:11:09 2018 |
tree | 055c11c676ea8dc3ce7dfba9fb32262d035caa86 | |
parent | 1548e78606431c60ad243b1a78847e41753cdf14 [diff] |
fido: avoid hairpinning of FidoRequestHandlerBase callbacks Currently, the |FidoRequestHandlerBase::AddAuthenticator| method synchronously invokes the virtual |DispatchRequest| method, which subclasses implement to process the request and invoke the response handling callback. Most authenticators are instantiated by a |FidoDiscovery| which does some asynchronous discovery work and then calls |AddAuthenticator|. Platform authenticators, on the other hand, are instantiated by |MaybeAddPlatformAuthenticator|, which gets invoked synchronously with request handler instantiation. This makes it possible to have a synchronous code path from request handler instantation to response callback invocation (i.e. hairpinning). In those cases, |AuthenticatorImpl| is unable to handle the response (see e.g. https://cs.chromium.org/chromium/src/content/browser/webauth/authenticator_impl.cc?sq=package:chromium&dr&g=0&l=749). This change makes |DispatchRequest| invocation asynchronous, which eliminates any possibility of response callback hairpinning. Bug: 678128 Change-Id: I6bf273775885abac1fa38fe12c964e930407cc7e Reviewed-on: https://chromium-review.googlesource.com/1172917 Commit-Queue: Martin Kreichgauer <martinkr@google.com> Reviewed-by: Balazs Engedy <engedy@chromium.org> Reviewed-by: Jun Choi <hongjunchoi@chromium.org> Cr-Commit-Position: refs/heads/master@{#583051}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .