Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Bug in parsing/expanding %% #1866
Comments
alandekok
added a commit
that referenced
this issue
Dec 7, 2016
|
|
alandekok |
75c5f59
|
alandekok
closed this
in 5835264
Dec 7, 2016
alandekok
added a commit
that referenced
this issue
Dec 7, 2016
|
|
alandekok |
f12ce0a
|
arr2036
added a commit
to arr2036/freeradius-server
that referenced
this issue
Dec 9, 2016
|
|
alandekok + arr2036 |
bc20068
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
llogar commentedDec 6, 2016
A %% within XLAT_ALTERNATE produces a sequence of XLAT_LITERAL entries, but only the first one is used in expanded output, as can be clearly seen from the output below where
%s','now')is missing in expanded text.Tue Dec 6 12:42:38 2016 : Debug: UPDATE radacct SET acctstarttime = %{%{integer:Event-Timestamp}:-strftime('%%s','now')} WHERE AcctUniqueId = '%{Acct-Unique-Session-Id}'Tue Dec 6 12:42:38 2016 : Debug: Parsed xlat tree:Tue Dec 6 12:42:38 2016 : Debug: literal --> UPDATE radacct SET acctstarttime =Tue Dec 6 12:42:38 2016 : Debug: if {Tue Dec 6 12:42:38 2016 : Debug: xlat --> integerTue Dec 6 12:42:38 2016 : Debug: {Tue Dec 6 12:42:38 2016 : Debug: literal --> Event-TimestampTue Dec 6 12:42:38 2016 : Debug: }Tue Dec 6 12:42:38 2016 : Debug: }Tue Dec 6 12:42:38 2016 : Debug: else {Tue Dec 6 12:42:38 2016 : Debug: literal --> strftime('Tue Dec 6 12:42:38 2016 : Debug: literal --> %Tue Dec 6 12:42:38 2016 : Debug: literal --> s','now')Tue Dec 6 12:42:38 2016 : Debug: }Tue Dec 6 12:42:38 2016 : Debug: literal --> WHERE AcctUniqueId = 'Tue Dec 6 12:42:38 2016 : Debug: attribute --> Acct-Unique-Session-IdTue Dec 6 12:42:38 2016 : Debug: literal --> 'Tue Dec 6 12:42:38 2016 : Debug: (5) sql: EXPAND UPDATE radacct SET acctstarttime = %{%{integer:Event-Timestamp}:-strftime('%%s','now')} WHERE AcctUniqueId = '%{Acct-Unique-Session-Id}'Tue Dec 6 12:42:38 2016 : Debug: (5) sql: --> UPDATE radacct SET acctstarttime = strftime(' WHERE AcctUniqueId = '45c3f44b4867f5c6be55f2325cea6973'radius version:
radiusd: FreeRADIUS Version 3.0.11, for host mipsel-openwrt-linux-gnu, built on Dec 3 2016 at 20:07:03