Skip to content

Commit 30340f7

Browse files
committed
Fixed new line handling for JSON
1 parent e49d3d3 commit 30340f7

File tree

6 files changed

+16
-4
lines changed

6 files changed

+16
-4
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11
# Change Log
2+
## [2.2.1] - 2018-02-15
3+
### Fixed
4+
- By [**Denis Kanchev**](https://github.com/Demayl)
5+
- Fix: simplify_path sub not used correct
6+
- fix: typo in quote regex in list.cgi for allowed_paths
7+
- fix: typo on pop in paste.cgi and symlink.cgi - so they work again
8+
- imp: use 3 arg open
9+
- fix: skip empty name of files - they are not needed because the path is separate from their name and empty name means nothing.
10+
- Small typo fix by [**eldk**](https://github.com/eldk)
11+
- Fixed new line handling for JSON, thus making module work in Usermin
12+
213
## [2.2.0] - 2018-01-31
314
### Fixed
415
- Fixed [#126](https://github.com/Real-Gecko/Filemin/issues/126)

filemin-lib.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ sub get_paths {
9898
if (scalar(@errors) > 0) {
9999
$result = '';
100100
foreach $error(@errors) {
101-
$result.= "$error<br>";
101+
$result.= "$error\\n";
102102
}
103103
print_ajax_header();
104104
print '{"error": "'.$result.'"}';

list.cgi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ foreach(@list) {
142142
if (scalar(@errors) > 0) {
143143
$result = '';
144144
foreach $error(@errors) {
145-
$result.= "$error<br>";
145+
$result.= "$error\\n";
146146
}
147147
print '{"error": "'.$result.'"}';
148148
} else {

module.info

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ desc=Filemin File Manager
22
os_support=*-linux freebsd
33
name=Filemin
44
longdesc=Fast and light file manager written in perl
5-
version=2.2.0
5+
version=2.2.1
66
webmin=1
77
usermin=1
88
flavour=full

pack.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/bin/bash
12
rm upload/*
23
cp unauthenticated/js/filemin.js unauthenticated/js/filemin.min.js
34
cp unauthenticated/js/spec-ops.js unauthenticated/js/spec-ops.min.js

paste.cgi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ if(open(my $fh, "<", &get_paste_buffer_file())) {
4646
if (scalar(@errors) > 0) {
4747
$result = '';
4848
foreach $error(@errors) {
49-
$result.= "$error<br>";
49+
$result.= "$error\\n";
5050
}
5151
print Mojo::JSON::to_json({'error' => $result});
5252
} else {

0 commit comments

Comments
 (0)