diff options
author | Andrey Oleynik <aoleynik@luxoft.com> | 2016-04-04 15:37:01 +0300 |
---|---|---|
committer | Andrey Oleynik <aoleynik@luxoft.com> | 2016-04-04 15:37:01 +0300 |
commit | 05797355fa6858badc0b42e019eefc15558925a3 (patch) | |
tree | 5bd62d026fd97392df20dc55e23e49ce0892ed1b | |
parent | 48aaf09ba9619ec040a29dea3257529aa27ff957 (diff) | |
download | sdl_core-05797355fa6858badc0b42e019eefc15558925a3.tar.gz |
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
-rw-r--r-- | src/components/application_manager/src/commands/mobile/dial_number_request.cc | 2 | ||||
-rw-r--r-- | 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 @@ <function name="DialNumber" messagetype="request"> <description>Request from SDL to call a specific number.</description> <param name="number" type="String" maxlength="40"> - <description>The number to dial. Only the character + and numbers are allowed.</description> + <description>Phone number is a string, which can be up to 40 chars. + All characters shall be stripped from string except digits 0-9 and * # , ; + + </description> </param> <param name="appID" type="Integer" mandatory="true"> <description>ID of application that concerns this RPC.</description> |