5 Commits
0.8.3 ... 0.8.6

Author SHA1 Message Date
Luc Didry
e7e02931ac Fix bug resulting in no EXIF tags deletion 2017-11-18 17:37:41 +01:00
Luc Didry
210a2a8df2 Update CHANGELOG for 0.8.5 2017-07-09 13:44:32 +02:00
Luc Didry
41e5f292eb Fix hennypenny.css for asset pack 2017-07-09 13:40:19 +02:00
Luc Didry
72f0469674 Udpate Changelog - release 0.8.4 2017-06-24 17:46:04 +02:00
Luc Didry
a842311304 Mitigate a bug using the same empty record twice
On the official instance, which is heavily used, some empty records are
used twice since the migration to PostgreSQL. Trying to choose randomly
among the available empty records to fix that and immediatly make them
not empty (add a fake path).

+ force lowest version of Net::SSLeay used, since the latest (more or
less) version is needed on Debian Stretch.
2017-06-24 17:43:29 +02:00
7 changed files with 51 additions and 63 deletions

View File

@@ -1,5 +1,20 @@
Revision history for Lutim
0.8.6 2017-11-18
- Fix bug resulting in no EXIF tags deletion
0.8.5 2017-07-09
- Fix Henny Penny font path in css
0.8.4 2017-06-24
- Mitigate a bug using the same empty record twice
0.8.3 2017-06-15
- Fix the donuts charts in the /stats page.
0.8.2 2017-06-14
- Enforce Mojolicious::Plugin::AssetPack version
0.8.1 2017-06-13
- Fix #46

View File

@@ -1,6 +1,7 @@
requires 'Mojolicious', '>= 7.31';
requires 'EV';
requires 'IO::Socket::SSL';
requires 'Net::SSLeay', '>= 1.81';
requires 'Data::Validate::URI';
requires 'Net::Domain::TLD', '>= 1.73'; # Must have the last version to handle (at least) .xyz and .link
requires 'Mojo::Pg';

View File

@@ -44,32 +44,6 @@ DISTRIBUTIONS
perl 5.008001
strict 0
warnings 0
CPAN-Meta-2.150010
pathname: D/DA/DAGOLDEN/CPAN-Meta-2.150010.tar.gz
provides:
CPAN::Meta 2.150010
CPAN::Meta::Converter 2.150010
CPAN::Meta::Feature 2.150010
CPAN::Meta::History 2.150010
CPAN::Meta::Merge 2.150010
CPAN::Meta::Prereqs 2.150010
CPAN::Meta::Spec 2.150010
CPAN::Meta::Validator 2.150010
Parse::CPAN::Meta 2.150010
requirements:
CPAN::Meta::Requirements 2.121
CPAN::Meta::YAML 0.011
Carp 0
Encode 0
Exporter 0
ExtUtils::MakeMaker 6.17
File::Spec 0.80
JSON::PP 2.27300
Scalar::Util 0
perl 5.008001
strict 0
version 0.88
warnings 0
CSS-Minifier-XS-0.09
pathname: G/GT/GTERMARS/CSS-Minifier-XS-0.09.tar.gz
provides:
@@ -1037,14 +1011,6 @@ DISTRIBUTIONS
Clone 0
ExtUtils::MakeMaker 0
perl 5.008001
IO-Socket-IP-0.39
pathname: P/PE/PEVANS/IO-Socket-IP-0.39.tar.gz
provides:
IO::Socket::IP 0.39
requirements:
IO::Socket 0
Socket 1.97
Test::More 0.88
IO-Socket-SSL-2.048
pathname: S/SU/SULLR/IO-Socket-SSL-2.048.tar.gz
provides:
@@ -1059,6 +1025,7 @@ DISTRIBUTIONS
IO::Socket::SSL::Utils 2.014
requirements:
ExtUtils::MakeMaker 0
Mozilla::CA 0
Net::SSLeay 1.46
Scalar::Util 0
IO-stringy-2.111
@@ -1264,16 +1231,6 @@ DISTRIBUTIONS
requirements:
ExtUtils::MakeMaker 0
perl 5.004
JSON-PP-2.94
pathname: I/IS/ISHIGAKI/JSON-PP-2.94.tar.gz
provides:
JSON::PP 2.94
JSON::PP::Boolean 2.94
JSON::PP::IncrParser 2.94
requirements:
ExtUtils::MakeMaker 0
Scalar::Util 1.08
Test::More 0
JavaScript-Minifier-XS-0.11
pathname: G/GT/GTERMARS/JavaScript-Minifier-XS-0.11.tar.gz
provides:
@@ -1340,6 +1297,7 @@ DISTRIBUTIONS
requirements:
ExtUtils::MakeMaker 0
Mojolicious 6.0
perl 5.010001
Minion-Backend-SQLite-0.009
pathname: D/DB/DBOOK/Minion-Backend-SQLite-0.009.tar.gz
provides:
@@ -1462,6 +1420,7 @@ DISTRIBUTIONS
ExtUtils::MakeMaker 0
Mojolicious 7.32
SQL::Abstract 1.81
perl 5.010001
Mojo-SQLite-2.002
pathname: D/DB/DBOOK/Mojo-SQLite-2.002.tar.gz
provides:
@@ -1605,6 +1564,7 @@ DISTRIBUTIONS
JSON::PP 2.27103
Pod::Simple 3.09
Time::Local 1.2
perl 5.010001
Mojolicious-Plugin-AssetPack-1.44
pathname: J/JH/JHTHORSEN/Mojolicious-Plugin-AssetPack-1.44.tar.gz
provides:
@@ -1689,6 +1649,14 @@ DISTRIBUTIONS
Sub::Defer 2.003001
Sub::Quote 2.003001
perl 5.006
Mozilla-CA-20160104
pathname: A/AB/ABH/Mozilla-CA-20160104.tar.gz
provides:
Mozilla::CA 20160104
requirements:
ExtUtils::MakeMaker 0
Test 0
perl 5.006
Net-Domain-TLD-1.75
pathname: A/AL/ALEXP/Net-Domain-TLD-1.75.tar.gz
provides:

View File

@@ -384,24 +384,26 @@ sub add {
}
unless ((defined($keep_exif) && $keep_exif) || $mediatype eq 'image/svg+xml' || $mediatype !~ m#image/(x-)?xcf# || $mediatype ne 'image/webp') {
# Remove the EXIF tags
my $data = new IO::Scalar \$upload->slurp();
my $et = new Image::ExifTool;
unless (defined($keep_exif) && $keep_exif) {
if ($mediatype ne 'image/svg+xml' && $mediatype !~ m#image/(x-)?xcf# && $mediatype ne 'image/webp') {
# Remove the EXIF tags
my $data = new IO::Scalar \$upload->slurp();
my $et = new Image::ExifTool;
# Use $data in Image::ExifTool object
$et->ExtractInfo($data);
# Remove all metadata
$et->SetNewValue('*', undef);
# Use $data in Image::ExifTool object
$et->ExtractInfo($data);
# Remove all metadata
$et->SetNewValue('*', undef);
# Create a temporary IO::Scalar to write into
my $temp;
my $a = new IO::Scalar \$temp;
$et->WriteInfo($data, $a);
# Create a temporary IO::Scalar to write into
my $temp;
my $a = new IO::Scalar \$temp;
$et->WriteInfo($data, $a);
# Update the uploaded file with it's no-tags clone
$data = Mojo::Asset::Memory->new->add_chunk($temp);
$upload->asset($data);
# Update the uploaded file with it's no-tags clone
$data = Mojo::Asset::Memory->new->add_chunk($temp);
$upload->asset($data);
}
}
my $key;

View File

@@ -69,7 +69,8 @@ sub select_created_after {
sub select_empty {
my $c = shift;
my $record = $c->app->pg->db->query('SELECT * FROM lutim WHERE path IS NULL LIMIT 1')->hashes->first;
my $record = $c->app->pg->db->query('SELECT * FROM lutim WHERE path IS NULL')->hashes->shuffle->first;
$c->app->pg->db->query('UPDATE lutim SET path = ? WHERE short = ?', 'used', $record->{short});
$c = $c->_slurp($record);

View File

@@ -72,9 +72,10 @@ sub select_created_after {
sub select_empty {
my $c = shift;
my @records = Lutim::DB::SQLite::Lutim->select('WHERE path IS NULL LIMIT 1');
my $record = c(Lutim::DB::SQLite::Lutim->select('WHERE path IS NULL'))->shuffle->first;
$record->update(path => 'used');
$c->record($records[0]);
$c->record($record);
$c = $c->_slurp;
return $c;

View File

@@ -2,5 +2,5 @@
font-family: 'Henny_Penny';
font-style: normal;
font-weight: 400;
src: local('Henny Penny'), local('HennyPenny-Regular'), url(../font/hennypenny.ttf) format('truetype');
src: local('Henny Penny'), local('HennyPenny-Regular'), url(../../font/hennypenny.ttf) format('truetype');
}