Mongo and operators
Giedrius Baronas
g.baronas at gmail.com
Wed Mar 31 00:11:20 CEST 2021
Hi,
I tried with your wrote output result but with it is failed. I ordering
op to above attribute and work with errors.
I moved the op above the attribute and it helped. The error left is that
op is NULL, which I don't know how to solve.
-------------------=========== incorrect
=============-------------------------
[ { id: '0', attribute: 'User-Name', value: 'test', op: '==' },
{ id: '0', attribute: 'User-Password', value: '12345', op: ':=' } ]
getting result from row 0 = 0x55e3c4760800
(0) sql: ERROR: The op field for attribute 'test = :=' is NULL, or
non-existent.
(0) sql: ERROR: You MUST FIX THIS if you want the configuration to
behave as you expect
(0) sql: ERROR: Failed to create the pair: Invalid vendor name in
attribute name "test"
(0) sql: ERROR: Error parsing user data from database result
(0) sql: ERROR: Error getting check attributes
-------------------=========== incorrect
=============-------------------------
[ { id: '0', op: '==', attribute: 'User-Name', value: 'test' },
{ id: '0', attribute: 'User-Password', op: ':=', value: '12345' } ]
getting result from row 0 = 0x55e3c4774c10
(1) sql: ERROR: The op field for attribute 'User-Name = test' is NULL,
or non-existent.
(1) sql: ERROR: You MUST FIX THIS if you want the configuration to
behave as you expect
getting result from row 1 = 0x55e3c47270a0
(1) sql: ERROR: The op field for attribute ':= = 12345' is NULL, or
non-existent.
(1) sql: ERROR: You MUST FIX THIS if you want the configuration to
behave as you expect
(1) sql: ERROR: Failed to create the pair: Invalid tag for attribute :=
(1) sql: ERROR: Error parsing user data from database result
(1) sql: ERROR: Error getting check attributes
--------------------=========== correct
=============--------------------------
[ { id: '0', op: '==', attribute: 'User-Name', value: 'test' },
{ id: '0', op: ':=', attribute: 'User-Password', value: '12345' } ]
getting result from row 0 = 0x561864ff8b50
(2) sql: ERROR: The op field for attribute 'User-Name = test' is NULL,
or non-existent.
(2) sql: ERROR: You MUST FIX THIS if you want the configuration to
behave as you expect
getting result from row 1 = 0x561865056560
(2) sql: ERROR: The op field for attribute 'User-Password = 12345' is
NULL, or non-existent.
(2) sql: ERROR: You MUST FIX THIS if you want the configuration to
behave as you expect
getting result from row 2 = (nil)
No more rows
(2) sql: User found in radcheck table
Found User-Password == "..."
Are you sure you don't mean Cleartext-Password?
See "man rlm_pap" for more information
(2) sql: Conditional check items matched, merging assignment check items
Giedrius
On 2021-03-30 02:07, Alan DeKok wrote:
> On Mar 29, 2021, at 6:39 PM, Giedrius Baronas <g.baronas at gmail.com> wrote:
>> What should be the result of the query so that there is no error message?
>>
>> [ { attribute: 'User-Name', value: 'test', op: ':=' },
>> { attribute: 'User-Password', value: '12345', op: ':=' } ]\
> The results should be the same 4 columns as returned by the SQL modules:
>
> ID
> Attribute
> value
> op
>
> { "id" : 0, "attribute" : "User-Name", "Value" : "pippo", "op" : "==" }
> { "id" : 0, "attribute" : "ClearText-Password", "value" : "pwd1", "op" : ":=" }
>
> It turns out the documentation was wrong. I'll go push a fix.
>
> Alan DeKok.
>
>
> -
> List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
More information about the Freeradius-Users
mailing list