Page MenuHomePhabricator

patch6248.txt

Authored By
bzimport
Nov 21 2014, 9:18 PM
Size
1006 B
Referenced Files
None
Subscribers
None

patch6248.txt

--- includes/GlobalFunctions.php 2006-05-23 12:27:25.000000000 +0200
+++ ../public_html/includes/GlobalFunctions.php 2006-06-09 11:14:37.664465762 +0200
@@ -1477,15 +1477,18 @@
function wfMkdirParents( $fullDir, $mode ) {
$parts = explode( '/', $fullDir );
$path = '';
+ $umask = umask(0);
foreach ( $parts as $dir ) {
$path .= $dir . '/';
if ( !is_dir( $path ) ) {
if ( !mkdir( $path, $mode ) ) {
+ umask($umask);
return false;
}
}
}
+ umask($umask);
return true;
}
--- includes/Math.php 2006-05-23 12:27:27.000000000 +0200
+++ ../public_html/includes/Math.php 2006-06-09 11:23:55.776940799 +0200
@@ -131,7 +131,7 @@
return $this->_error( 'math_bad_output' );
}
- if( !rename( "$wgTmpDirectory/{$this->hash}.png", "$hashpath/{$this->hash}.png" ) ) {
+ if( !chmod("$wgTmpDirectory/{$this->hash}.png", 0644) || !rename( "$wgTmpDirectory/{$this->hash}.png", "$hashpath/{$this->hash}.png" ) ) {
return $this->_error( 'math_output_error' );
}

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2536
Default Alt Text
patch6248.txt (1006 B)

Event Timeline