PacketFence - BTS - PacketFence | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0001676 | PacketFence | radius | public | 2013-08-01 16:11 | 2013-09-13 11:10 |
Reporter | dgreer | ||||
Assigned To | francis | ||||
Priority | normal | Severity | major | Reproducibility | have not tried |
Status | resolved | Resolution | fixed | ||
Platform | OS | OS Version | |||
Product Version | 4.0.1 | ||||
Target Version | Fixed in Version | 4.0.4 | |||
fixed in git revision | 4861189ba7faf680eef257d5b1c157d7260fe0de | ||||
fixed in mtn revision | |||||
Summary | 0001676: In 4.0.3, RADIUS stopped authenticating | ||||
Description | Not sure what I did to trigger this, but had a problem with RADIUS authentication, specifically the following error message: "Error: rlm_perl: No or invalid reply in SOAP communication with server. Check server side logs for details." Digging down, I found this was coming from the call of pf/raddb/packetfence.pm, and in that I figured out that I could dump return contents to the radius.log, so I did that and got this: "Thu Aug 1 14:37:44 2013 : Info: rlm_perl: curl_return_code: 0 Thu Aug 1 14:37:44 2013 : Info: rlm_perl: <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" [^] xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" [^] xmlns:xsd="http://www.w3.org/2001/XMLSchema" [^] soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" [^] xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>Content-Type [^] must be 'text/xml,' 'multipart/*,' 'application/soap+xml,' 'or 'application/dime' instead of 'application/x-www-form-urlencoded'</faultstring></soap:Fault></soap:Body></soap:Envelope> " Doing some Googling brought me to this article on StackExchange: http://stackoverflow.com/questions/9062121/send-a-http-post-requestxml-data-using-wwwcurl-in-perl [^] So I plugged in the CURLOPT_HTTPHEADER() line to force it to use "text/xml" and problem is fixed. Here's the patch: ]# diff -U2 /root/backup/usr/local/pf/raddb/packetfence.pm packetfence.pm --- /root/backup/usr/local/pf/raddb/packetfence.pm 2013-07-22 14:30:34.000000000 -0500 +++ packetfence.pm 2013-08-01 15:01:57.000000000 -0500 @@ -174,4 +174,5 @@ my $response_body; $curl->setopt(CURLOPT_HEADER, 0); + $curl->setopt(CURLOPT_HTTPHEADER(), ['Content-Type: text/xml; charset=UTF-8']); $curl->setopt(CURLOPT_URL, 'http://127.0.0.1:' [^] . SOAP_PORT); # TODO: See note1 # $curl->setopt(CURLOPT_URL, 'http://127.0.0.1:' [^] . $Config{'ports'}{'soap'}); # TODO: See note1 @@ -184,5 +185,6 @@ # For debugging purposes - #&radiusd::radlog($RADIUS::L_INFO, "curl_return_code: $curl_return_code"); +# &radiusd::radlog($RADIUS::L_INFO, "curl_return_code: $curl_return_code"); +# &radiusd::radlog($RADIUS::L_INFO, "$response_body"); # Looking at the results... | ||||
Steps To Reproduce | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2013-08-01 16:11 | dgreer | New Issue | |||
2013-08-01 21:12 | fdurand | Note Added: 0003373 | |||
2013-09-13 11:10 | francis | fixed in git revision | => 4861189ba7faf680eef257d5b1c157d7260fe0de | ||
2013-09-13 11:10 | francis | Status | new => resolved | ||
2013-09-13 11:10 | francis | Fixed in Version | => 4.0.4 | ||
2013-09-13 11:10 | francis | Resolution | open => fixed | ||
2013-09-13 11:10 | francis | Assigned To | => francis |
Notes | |||||
|
|||||
|
|