From 05797355fa6858badc0b42e019eefc15558925a3 Mon Sep 17 00:00:00 2001 From: Andrey Oleynik Date: Mon, 4 Apr 2016 15:37:01 +0300 Subject: Adds latest number validation changes According to latest information number should be verified as: "Phone number is a string, which can be up to 40 chars. All characters shall be stripped from string except digits 0-9 and * # , ; +" Implements: APPLINK-11266 --- .../application_manager/src/commands/mobile/dial_number_request.cc | 2 +- src/components/interfaces/HMI_API.xml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/application_manager/src/commands/mobile/dial_number_request.cc b/src/components/application_manager/src/commands/mobile/dial_number_request.cc index d9dde280cd..6e8f5e15ad 100644 --- a/src/components/application_manager/src/commands/mobile/dial_number_request.cc +++ b/src/components/application_manager/src/commands/mobile/dial_number_request.cc @@ -130,7 +130,7 @@ void DialNumberRequest::on_event(const event_engine::Event& event) { void DialNumberRequest::StripNumberParam(std::string& number) { std::size_t found = 0; while (std::string::npos != - (found = number.find_first_not_of("+0123456789"))) { + (found = number.find_first_not_of("+*#,;0123456789"))) { number.erase(number.begin() + found); } (*message_)[strings::msg_params][strings::number] = number; diff --git a/src/components/interfaces/HMI_API.xml b/src/components/interfaces/HMI_API.xml index 621695a0c0..d5e4e879fe 100644 --- a/src/components/interfaces/HMI_API.xml +++ b/src/components/interfaces/HMI_API.xml @@ -2191,7 +2191,9 @@ Request from SDL to call a specific number. - The number to dial. Only the character + and numbers are allowed. + Phone number is a string, which can be up to 40 chars. + All characters shall be stripped from string except digits 0-9 and * # , ; + + ID of application that concerns this RPC. -- cgit v1.2.1