-rw-r--r-- | NEWS.xml | 1 | ||||
-rw-r--r-- | lib/params.cc | 3 |
2 files changed, 3 insertions, 1 deletions
@@ -1,11 +1,12 @@ <?xml version="1.0" encoding="us-ascii"?> <news> <version version="0.1" date="January 12th, 2007"> <ni>OpenID simple registration extension implementation</ni> <ni>OpenID extensions framework</ni> <ni>Canonicalization bugfix</ni> + <ni>Slightly improved interoperability with buggy implementations</ni> </version> <version version="0.0" date="July 25th, 2005"> <ni>Initial release</ni> </version> </news> diff --git a/lib/params.cc b/lib/params.cc index 03867d5..b181811 100644 --- a/lib/params.cc +++ b/lib/params.cc @@ -30,13 +30,14 @@ namespace opkele { string::size_type co = kv.find(':',p); if(co==string::npos) break; string::size_type nl = kv.find('\n',co+1); if(nl==string::npos) throw bad_input(OPKELE_CP_ "malformed input"); - insert(value_type(kv.substr(p,co-p),kv.substr(co+1,nl-co-1))); + if(nl>co) + insert(value_type(kv.substr(p,co-p),kv.substr(co+1,nl-co-1))); p = nl+1; } } void params_t::sign(secret_t secret,string& sig,const string& slist,const char *prefix) const { string kv; |