author | Michael Krelin <hacker@klever.net> | 2007-01-12 14:21:03 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-01-12 14:21:03 (UTC) |
commit | 83516ff76d24142cdc5193875ee7b684652f2eaf (patch) (unidiff) | |
tree | ee0eedac2f6bb63beaa25291fab47fe40d1e8662 | |
parent | 782d7a9e2c07ff6621b754595642aa3fec377bd2 (diff) | |
download | libopkele-83516ff76d24142cdc5193875ee7b684652f2eaf.zip libopkele-83516ff76d24142cdc5193875ee7b684652f2eaf.tar.gz libopkele-83516ff76d24142cdc5193875ee7b684652f2eaf.tar.bz2 |
Be a bit more liberal in what we accept as key-value pairs
-rw-r--r-- | NEWS.xml | 1 | ||||
-rw-r--r-- | lib/params.cc | 3 |
2 files changed, 3 insertions, 1 deletions
@@ -4,6 +4,7 @@ | |||
4 | <ni>OpenID simple registration extension implementation</ni> | 4 | <ni>OpenID simple registration extension implementation</ni> |
5 | <ni>OpenID extensions framework</ni> | 5 | <ni>OpenID extensions framework</ni> |
6 | <ni>Canonicalization bugfix</ni> | 6 | <ni>Canonicalization bugfix</ni> |
7 | <ni>Slightly improved interoperability with buggy implementations</ni> | ||
7 | </version> | 8 | </version> |
8 | <version version="0.0" date="July 25th, 2005"> | 9 | <version version="0.0" date="July 25th, 2005"> |
9 | <ni>Initial release</ni> | 10 | <ni>Initial release</ni> |
diff --git a/lib/params.cc b/lib/params.cc index 03867d5..b181811 100644 --- a/lib/params.cc +++ b/lib/params.cc | |||
@@ -33,7 +33,8 @@ namespace opkele { | |||
33 | string::size_type nl = kv.find('\n',co+1); | 33 | string::size_type nl = kv.find('\n',co+1); |
34 | if(nl==string::npos) | 34 | if(nl==string::npos) |
35 | throw bad_input(OPKELE_CP_ "malformed input"); | 35 | throw bad_input(OPKELE_CP_ "malformed input"); |
36 | insert(value_type(kv.substr(p,co-p),kv.substr(co+1,nl-co-1))); | 36 | if(nl>co) |
37 | insert(value_type(kv.substr(p,co-p),kv.substr(co+1,nl-co-1))); | ||
37 | p = nl+1; | 38 | p = nl+1; |
38 | } | 39 | } |
39 | } | 40 | } |