Bug #23433

ISC DHCP new parser my break when parsing lease uids

Added by Dmitri Dolguikh 3 months ago. Updated 4 days ago.

Status:Closed
Priority:Normal
Assignee:Dmitri Dolguikh
Category:DHCP
Target version:1.17.2
Difficulty: Team Backlog:
Triaged: Fixed in Releases:
Bugzilla link: Found in Releases:Foreman - 1.17.1
Pull request:https://github.com/theforeman/smart-proxy/pull/588, https://github.com/theforeman/smart-proxy/pull/583

Related issues

Related to Smart Proxy - Bug #23031: ISC DHCP new parser is still unable to parse DUID Closed 03/27/2018

Associated revisions

Revision 14a7505f
Added by Dmitri Dolguikh about 1 month ago

Fixes #23433 - lease uids are now parsed correctly

History

#1 Updated by Dmitri Dolguikh 3 months ago

  • Related to Bug #23031: ISC DHCP new parser is still unable to parse DUID added

#2 Updated by Huaqing Z 2 months ago

The literal regex is still broken.

        def server_duid
          Rsec::Fail.reset
          keyword = word('server-duid').fail 'keyword_server_duid'
          anything = /[^;,{}\s]+/.r
          literal = /"([^"]|\")*"/.r

fails on

server-duid "\000\001\000\001\"vt\346\000PV\225S\347";

Changing the regex to

          literal = /"([^"]|\\\")*"/.r

Though you could just literally do /".*"/ and rely on greedy regex match to fix the issue and simplify the code.

#3 Updated by The Foreman Bot 2 months ago

  • Assignee set to Dmitri Dolguikh
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/smart-proxy/pull/583 added

#4 Updated by Anonymous about 1 month ago

  • % Done changed from 0 to 100
  • Status changed from Ready For Testing to Closed

#5 Updated by Ivan Necas about 1 month ago

  • Legacy Backlogs Release (now unused) set to 330

I guess this should be pulled into 1.18 release

#6 Updated by Timo Goebel about 1 month ago

1.17 branch would be even better. Unfortunately, I can't update the release field.

#7 Updated by The Foreman Bot about 1 month ago

  • Pull request https://github.com/theforeman/smart-proxy/pull/588 added

#8 Updated by Lukas Zapletal about 1 month ago

  • Legacy Backlogs Release (now unused) changed from 330 to 360
  • Category set to DHCP

Requesting backport into 1.17, this is an important one: #23784

#9 Updated by Han Boetes about 1 month ago

I concur, this is an important patch. For anyone wanting to try the patch on 1.17:

Also available in: Atom PDF