[Boost-bugs] [Boost C++ Libraries] #12253: UUID Valid String Semantics are Erratic

Subject: [Boost-bugs] [Boost C++ Libraries] #12253: UUID Valid String Semantics are Erratic
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2016-06-06 19:57:34


#12253: UUID Valid String Semantics are Erratic
--------------------------------+--------------------------
 Reporter: Aaron <dartme18@…> | Type: Bugs
   Status: new | Milestone: Boost 1.61.0
Component: None | Version: Boost 1.60.0
 Severity: Problem | Keywords:
--------------------------------+--------------------------
 In boost/uuid/string_generator.hpp unsigned char get_value(char c) const,
 the hex characters [0123456789abcdefABCDEF] are handled explicitly, and
 any other character is treated as 0xFF (255). However, from line 89
 (within operator()), if there is a dash in the ninth character, but not in
 the fourteenth, etc., throw_invalid is called. That means that the uuid
 "Have a great big roast-beef sandwich!" will not throw, but
 "01234567-89abcdef-0123-456789abcdef" will.

 Instead of allowing most invalid characters (excepting dashes and lack of
 braces in certain positions), we should disallow anything but the standard
 hex digits as digits. Besides the brace and dash handling as it currently
 is, only [0123456789abcdefABCDEF] should be allowed.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/12253>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:20 UTC