All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: [PATCH 2/8] stkagent: '+' is considered as a digit
Date: Thu, 23 Aug 2012 13:15:48 -0500	[thread overview]
Message-ID: <50367354.2080004@gmail.com> (raw)
In-Reply-To: <50365213.7070607@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 1338 bytes --]

Hi Philippe,

>>> +}
>>> +
>>> static void stk_agent_send_noreply(struct stk_agent *agent, const char
>>> *method)
>>> {
>>> DBusConnection *conn = ofono_dbus_get_connection();
>>> @@ -541,7 +562,7 @@ static void get_digit_cb(DBusPendingCall *call,
>>> void *data)
>>> DBUS_TYPE_STRING,&digit,
>>> DBUS_TYPE_INVALID) == FALSE ||
>>> strlen(digit) != 1 ||
>>> - !valid_phone_number_format(digit)) {
>>> + !check_digit(digit)) {
>>
>> This is still wrong as it also needs to take care of the hidden_input
>> case where the '+' is not allowed.
>
> Good point. But then, it requires to retrieve the command qualifier (or
> at least the hidden_val property from the agent->msg).
>
> I think this is more complicated to perform this checking here. It
> should be more convenient to place this in the callback (here
> 'request_key_cb').
> But we can think also to simply remove any checking. For GET_INPUT, we
> are not checking the min/max length ;o)

No, we do need to sanitize any output from the agent.  We do this in a 
half assed way right now and that needs to be fixed.

>
> Note that apparently, we missed to consider the hidden property in
> 'handle_command_get_inkey'. Therefore, we are not sending this
> information to the STK agent. I'm willing to correct this.

Please do.

Regards,
-Denis

  reply	other threads:[~2012-08-23 18:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-22 16:18 [PATCH 1/8] ussd: Recover idle state in case of response sending failure Philippe Nunes
2012-08-22 16:18 ` [PATCH 2/8] stkagent: '+' is considered as a digit Philippe Nunes
2012-08-22 22:55   ` Denis Kenzior
2012-08-23 15:53     ` Philippe Nunes
2012-08-23 18:15       ` Denis Kenzior [this message]
2012-08-22 16:18 ` [PATCH 3/8] call-forwarding: return specific errors for SS query Philippe Nunes
2012-08-22 23:18   ` Denis Kenzior
2012-08-22 16:18 ` [PATCH 4/8] call-forwarding: class applied is the class given by SS code Philippe Nunes
2012-08-22 23:36   ` Denis Kenzior
2012-08-23 15:30     ` Philippe Nunes
2012-08-23 18:32       ` Denis Kenzior
2012-08-22 16:18 ` [PATCH 5/8] call-barring: Return specific errors for SS query Philippe Nunes
2012-08-22 23:19   ` Denis Kenzior
2012-08-22 16:18 ` [PATCH 6/8] call-barring: class applied is the class given by SS code Philippe Nunes
2012-08-22 16:18 ` [PATCH 7/8] call-settings: Return specific errors for SS query Philippe Nunes
2012-08-22 23:19   ` Denis Kenzior
2012-08-22 16:18 ` [PATCH 8/8] call-settings: class applied is the class given by SS code Philippe Nunes
2012-08-22 23:41   ` Denis Kenzior
2012-08-22 23:02 ` [PATCH 1/8] ussd: Recover idle state in case of response sending failure Denis Kenzior
2012-08-23 10:30   ` Philippe Nunes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50367354.2080004@gmail.com \
    --to=denkenz@gmail.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.