WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
204621
SMS Autofill Crash - ReplaceWithString Exception
https://bugs.webkit.org/show_bug.cgi?id=204621
Summary
SMS Autofill Crash - ReplaceWithString Exception
Sinan
Reported
2019-11-26 07:42:42 PST
Created
attachment 384354
[details]
Thread Logs We are using Autofill feature in our html pages with wkwebview. There is an input field with sms otp which detects code from messages app. If the user tap on suggestion and close the keyboard, it works fine but at this moment if any sender sends same otp code and users taps again that suggestion, application crashes. Here is the step by step guide for reproduce crash: 1- Render any html which is including input field with `autocomplete="one-time-code"` feature 2- Send sms with otp code from other device 3- Tap on the input field and tap suggestion 4- Dismiss keyboard 5- Send same sms to device 6- Tap again the input field and tap suggestion again 7- It will be crashed We have attached threads when this crash happened and here is the viewcontroller codes: import UIKit import WebKit class ViewController: UIViewController { let html: String = """ <!DOCTYPE html> <html> <body> <h2>HTML Forms</h2> <form action="/action_page.php"> SMS Code:<br> <input type="text" name="firstname" id="single-factor-code-text-field" autocomplete="one-time-code"/> <br> <br><br> </form> </body> </html> """ @IBOutlet weak var textField: UITextField! lazy var webView: WKWebView = { let configuration = WKWebViewConfiguration() let webView = WKWebView(frame: self.view.frame, configuration: configuration) self.view.addSubview(webView) webView.translatesAutoresizingMaskIntoConstraints = false webView.topAnchor.constraint(equalTo: self.view.topAnchor, constant: 0).isActive = true webView.bottomAnchor.constraint(equalTo: self.view.bottomAnchor, constant: 0).isActive = true webView.leadingAnchor.constraint(equalTo: self.view.leadingAnchor, constant: 0).isActive = true webView.trailingAnchor.constraint(equalTo: self.view.trailingAnchor, constant: 0).isActive = true return webView }() override func viewDidLoad() { super.viewDidLoad() loadHTML() } func loadHTML() { webView.loadHTMLString(html, baseURL: nil) } }
Attachments
Thread Logs
(20.85 KB, text/plain)
2019-11-26 07:42 PST
,
Sinan
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2019-11-26 15:36:01 PST
> #0. Crashed: com.twitter.crashlytics.ios.exception
Would it be possible to disable this, and to generate a system crash log? Also, can you attach a complete project that reproduces the issue?
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug