https://bugzilla.wikimedia.org/show_bug.cgi?id=22307
Summary: Http::get within HttpFunction.php will not work with
windows authentication.
Product: MediaWiki
Version: 1.13.2
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: Normal
Component: General/Unknown
AssignedTo: [email protected]
ReportedBy: [email protected]
The method Http::get, which is within includes/HttpFunction.php, will not work
if you use windows authentication within IIS. We believe it is because
Integrated Windows Authentication does not allow automated access to a URL via
PHP. We noticed the error within the dump html extension: dumpHTML.inc in the
method makeUrlSnapshot.
We created this method as a work around. It changes the url to a file using
$IP. See the comments for restrictions to this method.
/**
* Added to replace function 'makeUrlSnapshot( $url )'.
* MakeUrlSnapshot will not work with IIS and windows anonymous access.
* @param String $url - url of a file with $wgScriptPath as the prefix.
* NOTE: It is important that url begins with $wgScriptPath.
*/
function copyUrlAsFile($url) {
global $IP;
$this->mkdir( "{$this->dest}/misc" );
$destName = urldecode( basename( $url ) );
$destPath = "{$this->dest}/misc/$destName";
if ( !file_exists( $destPath ) ) {
//Replace scriptPath with $IP.
//Make sure to replace only the prefix.
$pattern ='/^'.
str_replace("/","\\/",$this->oldScriptPath) . '/';
$newUrl = preg_replace($pattern,$IP,$url,1);
copy($newUrl,$destPath);
}
return "{$this->articleBaseUrl}/misc/" . urlencode( $destName );
}
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l