Skip to content

Commit

Permalink
Fixed #141
Browse files Browse the repository at this point in the history
  • Loading branch information
Real-Gecko committed Mar 13, 2018
1 parent 30340f7 commit 3febed1
Show file tree
Hide file tree
Showing 11 changed files with 73 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Change Log
## [2.2.2] - 2018-03-13
### Fixed
- Fixed [#141](https://github.com/Real-Gecko/Filemin/issues/141) - updater will keep Filemin flavour in own config.

## [2.2.1] - 2018-02-15
### Fixed
- By [**Denis Kanchev**](https://github.com/Demayl)
Expand Down
Binary file modified filemin-updater.bsd.tar.gz
Binary file not shown.
Binary file modified filemin-updater.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion filemin-updater/index.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if($remote_user eq 'root' & $vc) {
%module_info = &get_module_info('filemin');
my $remote = version->parse($remote_module_info{'version'});
my $local = version->parse($module_info{'version'});
my $flavour = $in{'flavour'};
my $flavour = $config{'flavour'};
if($local < $remote) {
my $os = $gconfig{'os_type'};
if(index($os, 'linux') != -1) {
Expand Down
2 changes: 1 addition & 1 deletion filemin-updater/module.info
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ desc=Filemin Updater
os_support=*-linux freebsd
name=Filemin Updater
longdesc=Filemin updater
version=1.0.1
version=1.0.2
webmin=1
2 changes: 1 addition & 1 deletion freebsd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ done < module.info
echo "Packing FreeBSD version $VERSION"

cd $DISTR
tar -zcf filemin-$VERSION.freebsd.wbm.gz filemin
# tar -zcf filemin-$VERSION.freebsd.wbm.gz filemin
tar -zcf filemin-$VERSION.freebsd.full.wbm.gz filemin
cd ../
rm -rf $TGDIR
46 changes: 46 additions & 0 deletions getfacl.cgi
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/usr/bin/perl

require './filemin-lib.pl';
use lib './lib';

&ReadParse();
get_paths();

print_ajax_header();

# Remove exploiting "../"
$name = $in{'name'};
$name =~ s/\.\.//g;
$name = &simplify_path($name);

# my @errors;

# $command = "getfacl ".quotemeta("$cwd$name")." 2>&1";
# $result = `$command`;

# print Mojo::JSON::to_json({'success' => "$result"});

$out = &backquote_command("getfacl ".quotemeta("$cwd$name")." 2>&1");
if ($?) {
print $out,"\n";
}
else {
foreach $l (split(/\n/, $out)) {
$l =~ s/#.*$//;
$l =~ s/\s+$//;
push(@rv, $l) if ($l =~ /\S/);
}
if (!@rv) {
print "Filesystem does not support ACLs\n";
}
else {
print "\n";
foreach $l (@rv) {
# $l =~ s/:/ /g;
if (index($l, "user") != -1) {
print $l,"\n";
}
}
}
}

5 changes: 3 additions & 2 deletions index.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if($remote_user eq 'root' & $vc & !$usermin) {
} else {
my %updater_info = &get_module_info('filemin-updater');
$installed = version->parse($updater_info{'version'});
$latest = version->parse('1.0.1');
$latest = version->parse('1.0.2');
if ($installed < $latest) {
print "Updating updater<br>";
$irv = &webmin::install_webmin_module("$module_root_directory/unauthenticated/filemin-updater.tar.gz");
Expand All @@ -66,8 +66,9 @@ if($remote_user eq 'root' & $vc & !$usermin) {
my $remote = version->parse($remote_module_info{'version'});
my $local = version->parse($module_info{'version'});
my $flavour = $module_info{'flavour'};
&save_module_config({'flavour' => $flavour}, 'filemin-updater');
if($local < $remote) {
print "<h4>$text{'newer_version_available'}<br><a href='update.cgi?version=$remote&flavour=$flavour'>$text{'click_to_update'}</a></h4>";
print "<h4>$text{'newer_version_available'}<br><a href='update.cgi?version=$remote'>$text{'click_to_update'}</a></h4>";
} else {
print $text{'module_up_to_date'};
};
Expand Down
2 changes: 1 addition & 1 deletion linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ done < module.info
echo "Packing Linux version $VERSION"

cd $DISTR
tar -zcf filemin-$VERSION.linux.wbm.gz filemin
# tar -zcf filemin-$VERSION.linux.wbm.gz filemin
tar -zcf filemin-$VERSION.linux.full.wbm.gz filemin
cd ../
perl makemoduledeb.pl --target-dir $DISTR $TGDIR
Expand Down
2 changes: 1 addition & 1 deletion module.info
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ desc=Filemin File Manager
os_support=*-linux freebsd
name=Filemin
longdesc=Fast and light file manager written in perl
version=2.2.1
version=2.2.2
webmin=1
usermin=1
flavour=full
Expand Down
15 changes: 15 additions & 0 deletions setfacl.cgi
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/perl

require './filemin-lib.pl';
use lib './lib';

&ReadParse();
get_paths();

print_ajax_header();

# Remove exploiting "../"
$name = $in{'name'};
$name =~ s/\.\.//g;
$name = simplify_path($name);

0 comments on commit 3febed1

Please sign in to comment.