Skip to content
This repository was archived by the owner on Dec 6, 2019. It is now read-only.

Commit 767c7ab

Browse files
committed
Patch for php-ofc-library exploit
1 parent 7303aa0 commit 767c7ab

File tree

3 files changed

+25
-15
lines changed

3 files changed

+25
-15
lines changed

Diff for: changelog.htm

+15-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
22
<html xmlns="http://www.w3.org/1999/xhtml">
33
<head>
44
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
@@ -33,10 +33,16 @@
3333
&nbsp;&nbsp;&nbsp;&nbsp;View license.txt in the root, or visit:<br />
3434
&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://creativecommons.org/licenses/by-nc-sa/3.0/"
3535
target="_blank">http://creativecommons.org/licenses/by-nc-sa/3.0/</a></p>
36-
<p class="header"><em>Last Update: Oct 23, 2009</em><br /></p>
36+
<p class="header"><em>Last Update: Sept 30, 2013</em><br /></p>
3737
<hr />
3838

39-
<h1>Build ##REVISION## (Version 2.1.##REVISION##)</h1>
39+
<h1>Build 938 (Version 2.1.938)</h1>
40+
<ul>
41+
<li>Patched the php-ofc-library to remove an exploit</li>
42+
</ul>
43+
<br/>
44+
45+
<h1>Build 937 (Version 2.1.937)</h1>
4046
<ul>
4147
<li>Navigation data included for routes, more accurate maps for schedules, ACARS and PIREPS</li>
4248
<li>Financial backend overhauled, all data is in real-time, and more accurate</li>
@@ -255,23 +261,23 @@ <h1>
255261
</ul>
256262
<p>
257263
<strong>New Settings:</strong></p>
258-
<pre>Config::Set('LOAD_FACTOR', '72');
259-
This setting determines the % of MAXLOAD which are on a flight.
264+
<pre>Config::Set('LOAD_FACTOR', '72');
265+
This setting determines the % of MAXLOAD which are on a flight.
260266
The system will generate a passenger/cargo load based off of this number.
261-
The industry load factor at this time is 72% (according to ATA).
267+
The industry load factor at this time is 72% (according to ATA).
262268
Can be adjusted, not more than 90%. phpVMS will decide between +/- 10% of LOAD_FACTOR
263269

264270
Config::Set('CARGO_UNITS', 'lbs');
265271
This is your units for cargo flights - lbs/kg/newtons ;)
266272

267-
Config::Set('UNITS', 'nm');
273+
Config::Set('UNITS', 'nm');
268274
Enter nm (nautical miles), mi (miles), or km (kilometers)
269275
This will affect distance calculations
270276

271277
Config::Set('VA_START_DATE', 'October 2008');
272278
<br /> This is the month your VA started, used for stats.
273279

274-
Config::Set('MONEY_UNIT', '$');
280+
Config::Set('MONEY_UNIT', '$');
275281
This is the unit of money. For non-dollars, use :
276282
Euro (&#8364;), enter &quot;&amp;#8364;&quot;
277283
Yen (&yen;), enter &quot;&amp;yen;&quot;
@@ -307,7 +313,7 @@ <h1>
307313

308314
schedule_details.tpl - Chart change
309315

310-
pirep_new.tpl - Added &quot;Fuel Used&quot; field, and removed flight leg field
316+
pirep_new.tpl - Added &quot;Fuel Used&quot; field, and removed flight leg field
311317

312318
profile_edit.tpl - Select box for signature background images</pre>
313319
<hr />

Diff for: core/lib/php-ofc-library/ofc_upload_image.php

+9-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77

88
/*
9-
9+
1010
print_r( $_GET );
1111
print_r( $_POST );
1212
print_r( $_FILES );
@@ -16,14 +16,17 @@
1616
1717
*/
1818

19+
exit(); // NS
1920

2021
// default path for the image to be stored //
2122
$default_path = '../tmp-upload-images/';
2223

2324
if (!file_exists($default_path)) mkdir($default_path, 0777, true);
2425

26+
// NS
27+
$name = filter_input(INPUT_GET, 'name', FILTER_SANITIZE_URL);
2528
// full path to the saved image including filename //
26-
$destination = $default_path . basename( $_GET[ 'name' ] );
29+
$destination = $default_path . basename( $_GET[ 'name' ] );
2730

2831
echo 'Saving your image to: '. $destination;
2932
// print_r( $_POST );
@@ -36,9 +39,10 @@
3639
// the raw bits into $HTTP_RAW_POST_DATA
3740
//
3841

39-
$jfh = fopen($destination, 'w') or die("can't open file");
42+
// NS - commented out
43+
/*$jfh = fopen($destination, 'w') or die("can't open file");
4044
fwrite($jfh, $HTTP_RAW_POST_DATA);
41-
fclose($jfh);
45+
fclose($jfh);*/
4246

4347
//
4448
// LOOK:
@@ -57,7 +61,7 @@
5761
if (!file_exists($default_path)) mkdir($default_path, 0777, true);
5862

5963
// full path to the saved image including filename //
60-
$destination = $default_path . basename( $_FILES[ 'Filedata' ][ 'name' ] );
64+
$destination = $default_path . basename( $_FILES[ 'Filedata' ][ 'name' ] );
6165

6266
// move the image into the specified directory //
6367
if (move_uploaded_file($_FILES[ 'Filedata' ][ 'tmp_name' ], $destination)) {

Diff for: core/version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
935
1+
936

0 commit comments

Comments
 (0)