Issue #15398 has been updated by Matthaus Litteken. Status changed from Merged - Pending Release to Closed
Released in Puppet 3.0.0-rc4 ---------------------------------------- Bug #15398: Typo in regex makes wrong values accepted as float https://projects.puppetlabs.com/issues/15398#change-70012 Author: Pieter van de Bruggen Status: Closed Priority: High Assignee: Daniel Pittman Category: language Target version: 3.0.0 Affected Puppet version: Keywords: Branch: https://github.com/puppetlabs/puppet/pull/908 Puppet::Parser::Scope.number? checks if a string matches /–?\d+(:?.\d+|(:?.\d+)?e\d+)$/ and calls to_f on it if so. The regex should rather be /–?\d+(?:.\d+|(?:.\d+)?e\d+)$/, swapping ‘:’ and ‘?’ to use non capturing groups. The current implementation will accept “3.:14”, and cast it into 3.0. Note that all numbers that should be accepted are dutifully accepted. Introducing commit is https://github.com/puppetlabs/puppet/blob/cfa230a2d7b0c5e57cc0379785bd2025520f1c35/lib/puppet/parser/scope.rb#L53 (Originally reported as #15396) -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
