From 83516ff76d24142cdc5193875ee7b684652f2eaf Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Fri, 12 Jan 2007 14:21:03 +0000 Subject: Be a bit more liberal in what we accept as key-value pairs --- diff --git a/NEWS.xml b/NEWS.xml index d8b93f2..210cf13 100644 --- a/NEWS.xml +++ b/NEWS.xml @@ -4,6 +4,7 @@ OpenID simple registration extension implementation OpenID extensions framework Canonicalization bugfix + Slightly improved interoperability with buggy implementations Initial release 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 { 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; } } -- cgit v0.9.0.2