summaryrefslogtreecommitdiffabout
path: root/lib
Unidiff
Diffstat (limited to 'lib') (more/less context) (ignore whitespace changes)
-rw-r--r--lib/basic_rp.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/basic_rp.cc b/lib/basic_rp.cc
index 9c7113b..bc1fb7f 100644
--- a/lib/basic_rp.cc
+++ b/lib/basic_rp.cc
@@ -276,33 +276,33 @@ namespace opkele {
276 util::strip_uri_fragment_part(rurl); 276 util::strip_uri_fragment_part(rurl);
277 string::size_type 277 string::size_type
278 tq = turl.find('?'), rq = rurl.find('?'); 278 tq = turl.find('?'), rq = rurl.find('?');
279 if( 279 if(
280 ((tq==string::npos)?turl:turl.substr(0,tq)) 280 ((tq==string::npos)?turl:turl.substr(0,tq))
281 != 281 !=
282 ((rq==string::npos)?rurl:rurl.substr(0,rq)) 282 ((rq==string::npos)?rurl:rurl.substr(0,rq))
283 ) 283 )
284 throw id_res_bad_return_to(OPKELE_CP_ "return_to url doesn't match request url"); 284 throw id_res_bad_return_to(OPKELE_CP_ "return_to url doesn't match request url");
285 map<string,string> tp; parse_query(turl,tq,tp); 285 map<string,string> tp; parse_query(turl,tq,tp);
286 map<string,string> rp; parse_query(rurl,rq,rp); 286 map<string,string> rp; parse_query(rurl,rq,rp);
287 for(map<string,string>::const_iterator rpi=rp.begin();rpi!=rp.end();++rpi) { 287 for(map<string,string>::const_iterator rpi=rp.begin();rpi!=rp.end();++rpi) {
288 map<string,string>::const_iterator tpi = tp.find(rpi->first); 288 map<string,string>::const_iterator tpi = tp.find(rpi->first);
289 if(tpi==tp.end()) 289 if(tpi==tp.end())
290 throw id_res_bad_return_to(OPKELE_CP_ string("Parameter '")+rpi->first+"' from return_to is missing from the request"); 290 throw id_res_bad_return_to(OPKELE_CP_ string("Parameter '")+rpi->first+"' from return_to is missing from the request");
291 if(tpi->second!=rpi->second) 291 if(tpi->second!=rpi->second)
292 throw id_res_bad_return_to(OPKELE_CP_ string("Parameter '")+rpi->first+"' from return_to doesn't matche the request"); 292 throw id_res_bad_return_to(OPKELE_CP_ string("Parameter '")+rpi->first+"' from return_to doesn't match the request");
293 } 293 }
294 294
295 if(om.has_field("claimed_id")) { 295 if(om.has_field("claimed_id")) {
296 claimed_id = om.get_field("claimed_id"); 296 claimed_id = om.get_field("claimed_id");
297 identity = om.get_field("identity"); 297 identity = om.get_field("identity");
298 verify_OP( 298 verify_OP(
299 om.get_field("op_endpoint"), 299 om.get_field("op_endpoint"),
300 claimed_id, identity ); 300 claimed_id, identity );
301 } 301 }
302 302
303 }else{ 303 }else{
304 claimed_id = get_endpoint().claimed_id; 304 claimed_id = get_endpoint().claimed_id;
305 /* TODO: check if this is the identity we asked for */ 305 /* TODO: check if this is the identity we asked for */
306 identity = om.get_field("identity"); 306 identity = om.get_field("identity");
307 } 307 }
308 if(ext) ext->rp_id_res_hook(om,signeds); 308 if(ext) ext->rp_id_res_hook(om,signeds);