Value validation failed

Hi,

I tried to send this string to the management socket:
<modify_setting setting_id=“5f5a8712-8017-11e1-8556-406186ea4fc5”>MTAwCg==</modify_setting>

I expected to set the “Rows Per Page” count but I always get this:
<modify_setting_response status=“400” status_text=“Value validation failed”/>

What does this mean. Is 100 not allowed as value or is the encoding not correct ?

I am using version 21.4.3 of gvmd.

Did you try without base64 encoding? I am not sure if that is necessary.

1 Like

I sent

<modify_setting setting_id="5f5a8712-8017-11e1-8556-406186ea4fc5"><value>100</value></modify_setting>

I got a 200 response but after requesting (get_settings) the returned xml contains this entry:

<setting id="5f5a8712-8017-11e1-8556-406186ea4fc5">
        <name>Rows Per Page</name>
        <comment>The default number of rows displayed in any listing.</comment>
        <value></value>
    </setting>

When looking in the database I got this:

gvmd=# select * from settings where uuid='5f5a8712-8017-11e1-8556-406186ea4fc5';
 id |                 uuid                 | owner |     name      |                       comment                        | value 
----+--------------------------------------+-------+---------------+------------------------------------------------------+-------
  2 | 5f5a8712-8017-11e1-8556-406186ea4fc5 |       | Rows Per Page | The default number of rows displayed in any listing. | 10
 14 | 5f5a8712-8017-11e1-8556-406186ea4fc5 |     1 | Rows Per Page | The default number of rows displayed in any listing. | 
(2 rows)

I don’t understand the owner setting and why the value is empty after receiving a 200 response code.