mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 836708 - [B2G RIL] Validate the numbers that are passed from SMSManager.send. r=vicamo
--HG-- extra : rebase_source : 05cbb8f610b952338f89939f44039177ac55efcf
This commit is contained in:
parent
b76d808dbf
commit
f6d15ab18e
@ -2670,7 +2670,7 @@ RadioInterfaceLayer.prototype = {
|
||||
|
||||
let options = this._fragmentText(message, null, strict7BitEncoding);
|
||||
options.rilMessageType = "sendSMS";
|
||||
options.number = number;
|
||||
options.number = PhoneNumberUtils.normalize(number);
|
||||
options.requestStatusReport = true;
|
||||
if (options.segmentMaxSeq > 1) {
|
||||
options.segmentRef16Bit = this.segmentRef16Bit;
|
||||
@ -2701,7 +2701,14 @@ RadioInterfaceLayer.prototype = {
|
||||
sms: sms,
|
||||
requestStatusReport: options.requestStatusReport
|
||||
});
|
||||
|
||||
if (PhoneNumberUtils.isPlainPhoneNumber(options.number)) {
|
||||
this.worker.postMessage(options);
|
||||
} else {
|
||||
debug('Number ' + options.number + ' is not sendable.');
|
||||
this.handleSmsSendFailed(options);
|
||||
}
|
||||
|
||||
}.bind(this));
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user