[Webkit-unassigned] [Bug 204621] New: SMS Autofill Crash - ReplaceWithString Exception
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Nov 26 07:42:42 PST 2019
https://bugs.webkit.org/show_bug.cgi?id=204621
Bug ID: 204621
Summary: SMS Autofill Crash - ReplaceWithString Exception
Product: WebKit
Version: Other
Hardware: iPhone / iPad
OS: iOS 13
Status: NEW
Severity: Major
Priority: P2
Component: Forms
Assignee: webkit-unassigned at lists.webkit.org
Reporter: sinanege at icloud.com
CC: cdumez at apple.com, wenson_hsieh at apple.com
Created attachment 384354
--> https://bugs.webkit.org/attachment.cgi?id=384354&action=review
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)
}
}
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20191126/f0b3c4d4/attachment.htm>
More information about the webkit-unassigned
mailing list