EnableSecureEventInput() fails to get connection to window server. |
||||
Issue description
Reproduction steps:
1. Launch Chrome from the command line with a fresh profile.
2. Try to sign in using the profile button.
3. After entering an email address, the window switches to a view that prompts for a password. At the same time, we see in the console:
""""
Dec 27 15:37:08 Chromium Helper[83955] <Warning>: CGSConnectionByID: 0 is not a valid connection ID.
Dec 27 15:37:08 Chromium Helper[83955] <Warning>: Invalid Connection ID 0
"""
Using lldb to break at the address where the log is emitted shows:
"""
* frame #0: 0x00007fff8b2e6d4b CoreGraphics`CGSConnectionByID
frame #1: 0x00007fff8b2e7a39 CoreGraphics`CGSGetConnectionPortById + 14
frame #2: 0x00007fff8b72fded CoreGraphics`CGSSetSecureEventInput + 16
frame #3: 0x00007fff9cecbad8 HIToolbox`EnableSecureEventInput + 40
frame #4: 0x000000012fdcabaf libblink_platform.dylib`enableSecureTextInput + 31 at SecureTextInput.cpp:36
frame #5: 0x00000001340999a3 libblink_core.dylib`setUseSecureKeyboardEntry + 35 at FrameSelection.cpp:1016
frame #6: 0x0000000134099a1b libblink_core.dylib`updateSecureKeyboardEntryIfActive + 59 at FrameSelection.cpp:1003
frame #7: 0x0000000134099a7d libblink_core.dylib`setUseSecureKeyboardEntryWhenActive + 77 at FrameSelection.cpp:1011
frame #8: 0x0000000134688fdf libblink_core.dylib`enableSecureTextInput + 79 at PasswordInputType.cpp:83
frame #9: 0x00000001345237d1 libblink_core.dylib`handleFocusEvent + 113 at HTMLInputElement.cpp:349
frame #10: 0x000000013460c03b libblink_core.dylib`dispatchFocusEvent + 91 at TextControlElement.cpp:96
frame #11: 0x0000000134f741e5 libblink_core.dylib`dispatchFocusEvent + 53 at FocusController.cpp:350
frame #12: 0x0000000134f74afe libblink_core.dylib`dispatchEventsOnWindowAndFocusedElement + 622 at FocusController.cpp:386
frame #13: 0x0000000134f7487d libblink_core.dylib`setFocused + 429 at FocusController.cpp:866
frame #14: 0x00000001320b74e4 libblink_web.dylib`setFocus + 100 at WebViewImpl.cpp:2253
frame #15: 0x00000001320a31c2 libblink_web.dylib`setFocus + 50 at WebViewFrameWidget.cpp:115
frame #16: 0x00000001204a0e28 libcontent.dylib`OnSetFocus + 120 at render_widget.cc:819
frame #17: 0x0000000120483d25 libcontent.dylib`SetFocus + 37 at render_view_impl.cc:2435
frame #18: 0x0000000120483cd0 libcontent.dylib`OnSetFocus + 240 at render_view_impl.cc:2431
frame #19: 0x00000001204b2752 libcontent.dylib`DispatchToMethodImpl<content::RenderWidget *, void (content::RenderWidget::*)(bool), const std::__1::tuple<bool> &, 0> + 162 at tuple.h:91
frame #20: 0x00000001204b26a0 libcontent.dylib`DispatchToMethod<content::RenderWidget *, void (content::RenderWidget::*)(bool), const std::__1::tuple<bool> &> + 96 at tuple.h:98
frame #21: 0x00000001204b261d libcontent.dylib`DispatchToMethod<content::RenderWidget, void (content::RenderWidget::*)(bool), void, std::__1::tuple<bool> > + 109 at ipc_message_templates.h:26
frame #22: 0x000000012049b55f libcontent.dylib`Dispatch<content::RenderWidget, content::RenderWidget, void, void (content::RenderWidget::*)(bool)> + 479 at ipc_message_templates.h:121
frame #23: 0x0000000120498cba libcontent.dylib`OnMessageReceived + 2682 at render_widget.cc:605
frame #24: 0x000000012047393e libcontent.dylib`OnMessageReceived + 9102 at render_view_impl.cc:1265
"""
Note that this error goes away when we run Chrome with "--no-sandbox". Over to rsesek to investigate further.
,
Oct 11 2017
Re: #1: Probably.
,
Oct 12 2017
This logic should all live in the browser. When a password field gets focus, the RenderWidgetHost should invoke EnableSecureEventInput().
,
Oct 12 2017
Issue 714177 has been merged into this issue.
,
Oct 12 2017
,
Nov 10 2017
Issue 782688 has been merged into this issue.
,
Nov 13 2017
+Password Manager team as FYI.
,
Mar 12 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f1574f25e1402e748bf2bd7e28ce3dd96ceb1ca4 commit f1574f25e1402e748bf2bd7e28ce3dd96ceb1ca4 Author: Michail Pishchagin <mblsha@yandex-team.ru> Date: Mon Mar 12 17:07:26 2018 MacViews: Enable secure text input for password Textfields. In Cocoa the NSTextInputContext automatically enables secure text input when activated and it's in the secure text entry mode. RenderWidgetHostViewMac did the similar thing for ages following the WebKit example. views::Textfield needs to do the same thing in a fashion that's sycnrhonized with RenderWidgetHostViewMac, otherwise the race conditions are possible when the Textfield gets focus, activates the secure text input mode and the RWHVM loses focus immediately afterwards and disables the secure text input instead of leaving it in the enabled state. BUG= 818133 , 677220 Change-Id: I6db6c4b59e4a1a72cbb7f8c7056f71b04a3df08b Reviewed-on: https://chromium-review.googlesource.com/943064 Commit-Queue: Michail Pishchagin <mblsha@yandex-team.ru> Reviewed-by: Pavel Feldman <pfeldman@chromium.org> Reviewed-by: Avi Drissman <avi@chromium.org> Reviewed-by: Peter Kasting <pkasting@chromium.org> Cr-Commit-Position: refs/heads/master@{#542517} [modify] https://crrev.com/f1574f25e1402e748bf2bd7e28ce3dd96ceb1ca4/content/browser/renderer_host/render_widget_host_view_mac.h [modify] https://crrev.com/f1574f25e1402e748bf2bd7e28ce3dd96ceb1ca4/content/browser/renderer_host/render_widget_host_view_mac.mm [modify] https://crrev.com/f1574f25e1402e748bf2bd7e28ce3dd96ceb1ca4/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm [modify] https://crrev.com/f1574f25e1402e748bf2bd7e28ce3dd96ceb1ca4/third_party/WebKit/Source/core/editing/FrameSelection.cpp [modify] https://crrev.com/f1574f25e1402e748bf2bd7e28ce3dd96ceb1ca4/third_party/WebKit/Source/core/editing/FrameSelection.h [modify] https://crrev.com/f1574f25e1402e748bf2bd7e28ce3dd96ceb1ca4/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp [modify] https://crrev.com/f1574f25e1402e748bf2bd7e28ce3dd96ceb1ca4/third_party/WebKit/Source/core/html/forms/HTMLInputElement.cpp [modify] https://crrev.com/f1574f25e1402e748bf2bd7e28ce3dd96ceb1ca4/third_party/WebKit/Source/core/html/forms/HTMLInputElement.h [modify] https://crrev.com/f1574f25e1402e748bf2bd7e28ce3dd96ceb1ca4/third_party/WebKit/Source/core/html/forms/InputType.cpp [modify] https://crrev.com/f1574f25e1402e748bf2bd7e28ce3dd96ceb1ca4/third_party/WebKit/Source/core/html/forms/InputType.h [modify] https://crrev.com/f1574f25e1402e748bf2bd7e28ce3dd96ceb1ca4/third_party/WebKit/Source/core/html/forms/PasswordInputType.cpp [modify] https://crrev.com/f1574f25e1402e748bf2bd7e28ce3dd96ceb1ca4/third_party/WebKit/Source/core/html/forms/PasswordInputType.h [modify] https://crrev.com/f1574f25e1402e748bf2bd7e28ce3dd96ceb1ca4/third_party/WebKit/Source/platform/BUILD.gn [delete] https://crrev.com/59abdb5ec27148747bc0a6633178ce5a661b6f35/third_party/WebKit/Source/platform/SecureTextInput.cpp [delete] https://crrev.com/59abdb5ec27148747bc0a6633178ce5a661b6f35/third_party/WebKit/Source/platform/SecureTextInput.h [modify] https://crrev.com/f1574f25e1402e748bf2bd7e28ce3dd96ceb1ca4/ui/base/BUILD.gn [add] https://crrev.com/f1574f25e1402e748bf2bd7e28ce3dd96ceb1ca4/ui/base/cocoa/secure_password_input.h [add] https://crrev.com/f1574f25e1402e748bf2bd7e28ce3dd96ceb1ca4/ui/base/cocoa/secure_password_input.mm [modify] https://crrev.com/f1574f25e1402e748bf2bd7e28ce3dd96ceb1ca4/ui/views/controls/textfield/textfield.cc [modify] https://crrev.com/f1574f25e1402e748bf2bd7e28ce3dd96ceb1ca4/ui/views/controls/textfield/textfield.h [modify] https://crrev.com/f1574f25e1402e748bf2bd7e28ce3dd96ceb1ca4/ui/views/controls/textfield/textfield_unittest.cc
,
Mar 28 2018
My testing indicates this is fixed by #8. |
||||
►
Sign in to add a comment |
||||
Comment 1 by elawrence@chromium.org
, Oct 11 2017