Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rlm_python can't create raw attributes #2044

Open
alandekok opened this issue Aug 23, 2017 · 1 comment
Open

rlm_python can't create raw attributes #2044

alandekok opened this issue Aug 23, 2017 · 1 comment
Labels
v3.x.x meta: relates to the v3.0.x branch

Comments

@alandekok
Copy link
Member

Issue type

  • [X ] Defect - Unexpected behaviour (obvious or verified by project member).

Defect/Feature description

How to reproduce issue

have the python module return

reply:Attr-26 = 0x00000009010f54657374417474726962757465

Output of [radiusd|freeradius] -X showing issue occurring

Wed Aug 23 00:44:09 2017 : Debug: (0) agent_mod: Using thread state 0x563921b35680
Wed Aug 23 00:44:11 2017 : Debug: authenticate - Failed: 'reply:Attr-26' = '0x00000009010f54657374417474726962757465'

The issue seems to be that the module calls

  • tmpl_from_attr_str() to convert the LHS to a template containing list + attribute.
    *fr_pair_afrom_da() to create a VP from tmpl.da
    *fr_pair_value_from_str() to add the value to the VP

In the first step, the tmpl_from_attr_str() is passed false for allow_unknown. Instead of erroring when given Attr-26, that function appears to return instead Vendor-Specific.

@herwinw
Copy link
Contributor

herwinw commented Aug 28, 2017

IIRC I wrote that part of the code, or rather copied it from rlm_perl. I wouldn't be surprised if rlm_perl has the same issue. And rlm_mruby

@alandekok alandekok added the v3.x.x meta: relates to the v3.0.x branch label Nov 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v3.x.x meta: relates to the v3.0.x branch
Projects
None yet
Development

No branches or pull requests

2 participants