4 Commits

Author SHA256 Message Date
99c6407af2 Accepting request 1224095 from Publishing
- Add patch html2ps-1.0b7-tmpname.patch 
  * Close the race between tmpnam() and sysopen

- Modify patch xhtml2ps_defaults.patch as we have no "see"
  ... use "gv -media=a4 -scale -2" 

- Update ot 1.0b7
  * Fixed a bug introduced by the previous bug fix...
  * 1.0b6
    "Security" fix. Changed behavior for SSI, to avoid having
    arbitrary readable files disclosed on a web server that uses
    html2ps in a web application (cgi script etc), allowing HTML
    files to be uploaded for conversion. Setting up a service like
    this is begging for trouble in my opinion. (Is /bin/cat also
    a vulnerability, since one can use it in a web app, allowing
    uploading arbitrary parameters to it?)
- Port patches
  html2ps-1.0b5-open.diff
  html2ps-1.0b5-opt.diff
- Add and port Debian patch set (boo#1214060)
  * document_dsc_option.patch
  * remove_latin1_char.patch
  * xhtml2ps_defaults.patch
  * default_paper_size.patch
  * proper_variable_escaping.patch
  * shell_tricks_removed.patch
  * large_eps_fix.patch
  * DSC_to_dsc.patch
  * fix_ps.patch
  * checker_warning.patch

OBS-URL: https://build.opensuse.org/request/show/1224095
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/html2ps?expand=0&rev=19
2024-11-14 15:08:19 +00:00
56bb9965c5 Close the race between tmpnam() and sysopen
OBS-URL: https://build.opensuse.org/package/show/Publishing/html2ps?expand=0&rev=11
2024-11-14 08:22:24 +00:00
37a50d7195 .
OBS-URL: https://build.opensuse.org/package/show/Publishing/html2ps?expand=0&rev=10
2024-11-12 10:26:19 +00:00
7d7ce3d807 Update to hmtl2ps 1.0b7 and add Debian patches
OBS-URL: https://build.opensuse.org/package/show/Publishing/html2ps?expand=0&rev=9
2024-11-12 08:46:06 +00:00
19 changed files with 468 additions and 19 deletions

18
DSC_to_dsc.patch Normal file
View File

@@ -0,0 +1,18 @@
From: Nigel Jones <nigelj@gmail.com>
Last-Update: 2005-05-29
Description: DSC renamed to dsc
This is patch fixes #176012 and #76569
diff --git a/html2ps b/html2ps
index 66c1bfb..aea859e 100755
--- a/html2ps
+++ b/html2ps
@@ -379,7 +379,7 @@ $version="html2ps version 1.0 beta7";
$opts="2|b:|c|C:|d|D|e:|f:|F|g|h|H|i:|k:|l:|L|m:|M:|n|N:|o:|O|r:|R|s:|S:|t|T|"
."u|U|v|W:|x:";
%optalias=( 'twoup','2', 'base','b', 'check','c', 'toc','C', 'debug','d',
- 'DSC','D', 'encoding','e', 'rcfile','f', 'frame','F', 'grayscale','g',
+ 'DSC','D', 'dsc','D', 'encoding','e', 'rcfile','f', 'frame','F', 'grayscale','g',
'help','h', 'hyphenate','H', 'scaleimage','i', 'cookie','k', 'language','l',
'landscape','L', 'scalemath','m', 'mainchapter','M', 'number','n',
'startno','N', 'output','o', 'original','O', 'rootdir','r', 'xref','R',

21
checker_warning.patch Normal file
View File

@@ -0,0 +1,21 @@
From: Rafael Cunha de Almeida <rafael@kontesti.me>
Forwarded: Yes
Last-Update: 2011-01-17
Description: Warns about HTML syntax checker returning an error
If the HTML syntax checker returns an error (if the command doesn't
exist or if it fails), the original behaviour is to quietly continue.
This patch makes html2ps louder. It warns that the HTML syntax checker
program returned an error.
diff --git a/html2ps b/html2ps
index ba6bf3b..1908139 100755
--- a/html2ps
+++ b/html2ps
@@ -2430,6 +2430,7 @@ sub h2p {
$file="$scr";
}
&dbg(`$package{'check'} $file`);
+ &dbg("warning: HTML syntax checker returned in error.\n") if ($?);
}
if(!$latin1) {

28
default_paper_size.patch Normal file
View File

@@ -0,0 +1,28 @@
From: Stephen Zander <gibreel@debian.org>
Last-Update: 2002-11-19
Description: Add support to the default paper size
Uses paper size specified by libpaper instead of defaulting to A4. This
makes the software integrate better with the system and user
spectations of it.
diff --git a/html2ps b/html2ps
index 07b79e8..51a60b6 100755
--- a/html2ps
+++ b/html2ps
@@ -28,6 +28,7 @@ eval 'exec perl -S $0 "$@"'
$globrc='/etc/html2psrc';
$ug='/usr/share/doc/packages/html2ps/html2ps.html';
+$default_paper=`paperconf` || 'a4';
$conf=<<'EOR';
@html2ps {
@@ -46,7 +47,7 @@ $conf=<<'EOR';
path: "";
}
paper {
- type: A4;
+ type: $default_paper;
height: "";
width: "";
}

20
document_dsc_option.patch Normal file
View File

@@ -0,0 +1,20 @@
From: Nigel Jones <nigelj@gmail.com>
Forwarded: Yes
Last-Update: 2011-08-06
Description: Documents lower case option for dsc option
There were parsing problems with DSC option and, together with a fix
to #176012 and #76569, the lower case of dsc was allowed.
Index: html2ps-1.0b7/html2ps.1
===================================================================
--- html2ps-1.0b7.orig/html2ps.1 2011-01-10 02:41:56.000000000 -0200
+++ html2ps-1.0b7/html2ps.1 2011-01-10 02:44:39.000000000 -0200
@@ -107,7 +107,7 @@
Generate debugging information. You should always use this
option when reporting problems with html2ps.
.TP
-.B -D --DSC
+.B -D --dsc --DSC
Generate DSC compliant PostScript. This requires Ghostscript and
can take quite some time to do. Note that a PostScript file generated
with this option cannot be used as input to html2ps for reformatting

12
fix_ps.patch Normal file
View File

@@ -0,0 +1,12 @@
diff --git a/html2ps b/html2ps
index aea859e..ba6bf3b 100755
--- a/html2ps
+++ b/html2ps
@@ -1608,7 +1608,6 @@ $defs$fontdef$reenc
Fi cH 1 eq and{fill}if} {Bz 0 RL 0 Bz RL Bz neg 0 RL 0 Bz neg RL
Fi cH 1 eq and{fill}if} {0 -5 R Bz 0 RL 0 21 RL Bz neg 0 RL 0 -21 RL}]} D
/MS {/Sm E D WB}D
-/O {BN()Sm BX} D
/O {BN()0 Sm BX} D
/BX {/Bt E D Bt 2 lt{/Ch E D CS 0.8 mul}{11 mul}ie W XO sub MR sub
2 copy gt{E}if pop /HZ E D Bt 2 eq{Fi not{pop()}if ( )E join /Ft E D TT

View File

@@ -1,5 +1,5 @@
--- html2ps
+++ html2ps
--- a/html2ps
+++ b/html2ps
@@ -354,8 +354,8 @@
EOR

View File

@@ -2,14 +2,14 @@
html2ps | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- html2ps
+++ html2ps 2017-05-12 07:20:11.170020495 +0000
--- a/html2ps
+++ b/html2ps 2017-05-12 07:20:11.170020495 +0000
@@ -26,8 +26,8 @@ eval 'exec perl -S $0 "$@"'
# Set the name of the global configuration file. See the installation notes
# and manual page for more details on configuration files.
-$globrc='/opt/misc/lib/html2ps/html2psrc';
-$ug='/opt/misc/lib/html2ps/html2ps.html';
-$globrc='/it/sw/share/www/lib/html2ps/html2psrc';
-$ug='/it/sw/share/www/lib/html2ps/html2ps.html';
+$globrc='/etc/html2psrc';
+$ug='/usr/share/doc/packages/html2ps/html2ps.html';

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f71e425d5db2eda9578f4f4b019b14da42d39f69a802e5bdb9d4609ae8903e93
size 128059

View File

@@ -0,0 +1,29 @@
Close the race between tmpnam() and sysopen
--- html2ps-1.0b7/html2ps
+++ html2ps-1.0b7/html2ps 2024-11-14 08:12:35.973246396 +0000
@@ -355,7 +355,8 @@ EOR
use POSIX;
$posix = 1;
-use File::Temp qw/ :POSIX /;
+use File::Temp qw/ :POSIX :mktemp /;
+use File::Basename;
%extend=('quote',1, 'font',1, 'colour',1, 'hyphenation',1);
%fal=("serif","times", "sans_serif","helvetica", "monospace","courier");
@@ -495,11 +496,10 @@ die "Ghostscript is required to generate
if($opt_D && !$package{'Ghostscript'});
die "Ghostscript is required to generate cross references\n"
if($opt_R && !$package{'Ghostscript'});
-$tmpname=$posix?tmpnam():"h2p_$$";
-sysopen TMP, $tmpname, O_RDWR|O_CREAT|O_EXCL, 0600 or die "$!";
-close TMP;
+($tmp, $tmpname) = mkstemp("/tmp/h2p_XXXXXXXX") or die "$!";
+close $tmp;
($scr=$tmpname)=~/\w+$/;
-$tempdir=$`;
+$tempdir=dirname($tmpname);
if($opt_u) {$ulanch="t"};
if(defined $opt_x && $opt_x!~/^[0-2]$/) {

3
html2ps-1.0b7.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d553980468a14bae738982c384c17f426ecf77dafd9a4e2499d520953f156f14
size 128451

View File

@@ -1,3 +1,45 @@
-------------------------------------------------------------------
Thu Nov 14 08:20:51 UTC 2024 - Dr. Werner Fink <werner@suse.de>
- Add patch html2ps-1.0b7-tmpname.patch
* Close the race between tmpnam() and sysopen
-------------------------------------------------------------------
Tue Nov 12 10:25:10 UTC 2024 - Dr. Werner Fink <werner@suse.de>
- Modify patch xhtml2ps_defaults.patch as we have no "see"
... use "gv -media=a4 -scale -2"
-------------------------------------------------------------------
Tue Nov 12 08:35:20 UTC 2024 - Dr. Werner Fink <werner@suse.de>
- Update ot 1.0b7
* Fixed a bug introduced by the previous bug fix...
* 1.0b6
"Security" fix. Changed behavior for SSI, to avoid having
arbitrary readable files disclosed on a web server that uses
html2ps in a web application (cgi script etc), allowing HTML
files to be uploaded for conversion. Setting up a service like
this is begging for trouble in my opinion. (Is /bin/cat also
a vulnerability, since one can use it in a web app, allowing
uploading arbitrary parameters to it?)
- Port patches
html2ps-1.0b5-open.diff
html2ps-1.0b5-opt.diff
- Add and port Debian patch set (boo#1214060)
* document_dsc_option.patch
* remove_latin1_char.patch
* xhtml2ps_defaults.patch
* default_paper_size.patch
* proper_variable_escaping.patch
* shell_tricks_removed.patch
* large_eps_fix.patch
* DSC_to_dsc.patch
* fix_ps.patch
* checker_warning.patch
* upstream_changelog.patch
* perl-deprecations.patch
-------------------------------------------------------------------
Thu Feb 22 07:53:41 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>

View File

@@ -1,7 +1,7 @@
#
# spec file for package html2ps
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,22 +12,34 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: html2ps
Version: 1.0b5
Version: 1.0b7
Release: 0
Url: http://user.it.uu.se/~jan/html2ps.html
URL: http://user.it.uu.se/~jan/html2ps.html
Summary: HTML to PostScript Converter
License: GPL-2.0+
License: GPL-2.0-or-later
Group: Productivity/Publishing/HTML/Tools
Source0: http://user.it.uu.se/~jan/%name-%version.tar.gz
Source1: html2psrc
Patch0: %{name}-%{version}-open.diff
Patch1: %{name}-%{version}-opt.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Patch0: %{name}-1.0b5-open.diff
Patch1: %{name}-1.0b5-opt.diff
Patch2: document_dsc_option.patch
Patch3: remove_latin1_char.patch
Patch4: xhtml2ps_defaults.patch
Patch5: default_paper_size.patch
Patch6: proper_variable_escaping.patch
Patch7: shell_tricks_removed.patch
Patch8: large_eps_fix.patch
Patch9: DSC_to_dsc.patch
Patch10: fix_ps.patch
Patch11: checker_warning.patch
Patch12: upstream_changelog.patch
Patch13: perl-deprecations.patch
Patch14: html2ps-1.0b7-tmpname.patch
BuildRequires: ImageMagick
BuildRequires: ghostscript-fonts-std
BuildRequires: ghostscript-x11
@@ -37,6 +49,7 @@ BuildRequires: perl-libwww-perl
BuildRequires: texlive-latex
Requires: ImageMagick
Requires: ghostscript_any
Requires: gv
Requires: netpbm
Requires: perl
Requires: perl-libwww-perl
@@ -59,7 +72,7 @@ many of the HTML 4.0 features. From the home page
* Automatic hyphenation and text justification can be selected.
%prep
%autosetup -p0
%autosetup -p1
%build
@@ -77,7 +90,8 @@ install -m644 html2psrc.5 %{buildroot}/%{_mandir}/man5/
%files
%defattr(-, root, root)
%doc COPYING README html2ps.html
%license COPYING
%doc README html2ps.html
%config %{_sysconfdir}/html2psrc
%doc %{_mandir}/man?/*
%{_bindir}/html2ps

22
large_eps_fix.patch Normal file
View File

@@ -0,0 +1,22 @@
From: Lauri Alanko <la@iki.fi>
Last-Update: 2003-05-18
Description: Fixes segmentation fault caused by large EPS
Running html2ps on files with largish EPS images (using the --original
option) can cause the program to segfault. After some examination with
perl -d and gdb, it turned out that perl's regexp matching engine blows
the stack with thousands of frames. The following trivial patch seems
to fix the problem, and it also makes EPS handling noticeably faster
diff --git a/html2ps b/html2ps
index 45351d2..18d4d4d 100755
--- a/html2ps
+++ b/html2ps
@@ -4320,7 +4320,7 @@ sub img {
push(@IT,1);
$nli=30000;
$n=1;
- $npr=$ps=~s|(.*\n){$nli}|sprintf("$&} D\n/P$nimg\_%d {",$n++)|eg;
+ $npr=$ps=~s|(.*\n{$nli})|sprintf("$1} D\n/P$nimg\_%d {",$n++)|eg;
if($npr) {
$proc=" (";
for $i (0..$npr) {

55
perl-deprecations.patch Normal file
View File

@@ -0,0 +1,55 @@
Description: fix various deprecations which became fatal in perl 5.26
- escape { in regexps
- replace POSIX::tmpnam() with File::Temp's backward compatibility equivalent
- additionally drop assignment to $[
Origin: vendor
Bug-Debian: https://bugs.debian.org/866317
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=740782
Author: gregor herrmann <gregoa@debian.org>
Last-Update: 2017-07-15
--- a/html2ps
+++ b/html2ps
@@ -355,6 +355,7 @@
use POSIX;
$posix = 1;
+use File::Temp qw/ :POSIX /;
%extend=('quote',1, 'font',1, 'colour',1, 'hyphenation',1);
%fal=("serif","times", "sans_serif","helvetica", "monospace","courier");
@@ -494,7 +495,7 @@
if($opt_D && !$package{'Ghostscript'});
die "Ghostscript is required to generate cross references\n"
if($opt_R && !$package{'Ghostscript'});
-$tmpname=$posix?POSIX::tmpnam():"h2p_$$";
+$tmpname=$posix?tmpnam():"h2p_$$";
sysopen TMP, $tmpname, O_RDWR|O_CREAT|O_EXCL, 0600 or die "$!";
close TMP;
($scr=$tmpname)=~/\w+$/;
@@ -3406,7 +3407,6 @@
local($optlist)=@_;
local(@args,$_,$opt,$opts,$rest,$olist,$plist,$found,@popts);
local($errs)=0;
- local($[)=0;
@args=split( /\|/, $optlist );
for $opt (@args) {
if(substr($opt,-1,1) ne ':') {$olist.=$opt}
@@ -3831,7 +3831,7 @@
$temp=$'=~/\/P\d+_?\d* \{/?$`:$rest;
($eps{$pid})=$temp=~/([\w\W]*)} D/;
}
- if(/\/DH {/) {
+ if(/\/DH \{/) {
$'=~/%EndDH/;
$ph="/DH {$`";
}
@@ -4082,7 +4082,7 @@
}
if(open(HYPH,"<$hyfile")) {
&dbg("Reading hyphenation patterns from $hyfile\n") if($opt_d);
- <HYPH>=~/\\patterns{.*/;
+ <HYPH>=~/\\patterns\{.*/;
close HYPH;
$def=$`;
($patterns=$')=~s/\^\^($X$X)/chr hex $1/eg;

View File

@@ -0,0 +1,60 @@
From: Trent Buck <trentbuck@gmail.com>
Last-Update: 2007-04-29
Description: Correctly quoting of paper configuration
The paper type wasn't set correctly even after using paperconf because
certain variables weren't correctly escaped and EOR wasn't correctly
quoted. This patches fixes that.
diff --git a/html2ps b/html2ps
index 51a60b6..c941b2c 100755
--- a/html2ps
+++ b/html2ps
@@ -30,8 +30,8 @@ $globrc='/it/sw/share/www/lib/html2ps/html2psrc';
$ug='/usr/share/doc/packages/html2ps/html2ps.html';
$default_paper=`paperconf` || 'a4';
-$conf=<<'EOR';
-@html2ps {
+$conf=<<"EOR";
+\@html2ps {
package {
PerlMagick: 0;
ImageMagick: 0;
@@ -90,7 +90,7 @@ $conf=<<'EOR';
middle: 2cm;
}
xref {
- text: "[p $N]";
+ text: "[p \$N]";
passes: 1;
}
quote {
@@ -137,8 +137,8 @@ $conf=<<'EOR';
}
titlepage {
content: "<DIV align=center>
- <H1><BIG>$T</BIG></H1>
- <H2>$[author]</H2></DIV>";
+ <H1><BIG>\$T</BIG></H1>
+ <H2>\$[author]</H2></DIV>";
margin-top: 4cm;
}
font {
@@ -270,7 +270,7 @@ $conf=<<'EOR';
fuchsia: FF00FF;
aqua: 00FFFF;
}
- html2psrc: "$HOME/.html2psrc";
+ html2psrc: "\$HOME/.html2psrc";
imgalt: "[IMAGE]";
datefmt: "%e %b %Y %R";
locale: "";
@@ -346,7 +346,7 @@ DEL { text-decoration: line-through }
A:link, HR { color: black }
-@page {
+\@page {
margin-left: 2.5cm;
margin-right: 2.5cm;
margin-top: 3cm;

19
remove_latin1_char.patch Normal file
View File

@@ -0,0 +1,19 @@
From: Florian Ernst <florian@debian.org>
Last-Update: 2011-08-06
Description: Replace latin1 character to proper troff syntax
Bokm<6B>l was spelled using a latin1 character. It was changed to use troff's
syntax instead. That way we keep the manpage encoding agnostic.
Index: html2ps-1.0b7/html2psrc.5
===================================================================
--- html2ps-1.0b7.orig/html2psrc.5 2011-01-10 02:41:56.000000000 -0200
+++ html2ps-1.0b7/html2psrc.5 2011-01-10 02:44:39.000000000 -0200
@@ -725,7 +725,7 @@
Language specific quotation marks are defined in this block.
These quotation marks are used with the HTML 4.01 element Q for short
quotations. Quotation marks are predefined for a few languages (English,
-Swedish, Danish, Norwegian (also Nynorsk and Bokm<6B>l), Finnish, Spanish,
+Swedish, Danish, Norwegian (also Nynorsk and Bokm\(oal), Finnish, Spanish,
French, German and Italian). It is possible to define different quotation
marks for quotes within quotes.
.PP

View File

@@ -0,0 +1,19 @@
From: Raphael Hertzog <rhertzog@hrnet.fr>
Last-Update: 1999-07-24
Description: Removed shell tricks
The packaged stopped working in 1999 due to this. This patches
substitutes the codes which used a shell to open perl to a hashbang
calling perl interpreter directly.
diff --git a/html2ps b/html2ps
index c941b2c..1404164 100755
--- a/html2ps
+++ b/html2ps
@@ -1,6 +1,4 @@
-: # Use perl
-eval 'exec perl -S $0 "$@"'
- if $running_under_some_shell;
+#! /usr/bin/perl
# This is html2ps version 1.0 beta7, an HTML-to-PostScript converter.
# Copyright (C) 1995-2010 Jan Karrman.

68
upstream_changelog.patch Normal file
View File

@@ -0,0 +1,68 @@
From: Rafael Cunha de Almeida <rafael@kontesti.me>
Last-Update: 2011-01-17
Description: Split README file into changelog and README
Upstream files README and changelog were split to better fit how things
work in Debian.
diff -Nurd html2ps-1.0b7.old/changelog html2ps-1.0b7.new/changelog
--- html2ps-1.0b7.old/changelog 1969-12-31 21:00:00.000000000 -0300
+++ html2ps-1.0b7.new/changelog 2011-01-17 21:21:26.000000000 -0200
@@ -0,0 +1,25 @@
+Brief history:
+
+ 941212 0.1 - First public release - text-only documents.
+ 950407 0.2 - Inline images.
+ 970609 1.0b - Support for most of HTML 3.2, configuration files introduced.
+ 970809 1.0b1 - Bug fixes. Some HTML 4.0 support, e.g. OBJECT, INS, DEL,
+ and ACRONYM.
+ 000727 1.0b2 - Mostly bug fixes. A title page can be generated. The symbol
+ set is extended to include information from META elements.
+ Installation script modified for Windows support.
+ 000815 1.0b3 - Bug fixes. Some support for Server Side Includes. Form
+ element contents can be rendered. Support for netscape
+ cookies.
+ 050225 1.0b4 Various bug fixes.
+ 051211 1.0b5 Bug fixes. Added -M option.
+ 091021 1.0b6 "Security" fix. Changed behavior for SSI, to avoid having
+ arbitrary readable files disclosed on a web server that uses
+ html2ps in a web application (cgi script etc), allowing HTML
+ files to be uploaded for conversion. Setting up a service like
+ this is begging for trouble in my opinion. (Is /bin/cat also
+ a vulnerability, since one can use it in a web app, allowing
+ uploading arbitrary parameters to it?)
+ 100507 1.0b7 Fixed a bug introduced by the previous bug fix...
+Jan K<>rrman
+jan@it.uu.se
diff -Nurd html2ps-1.0b7.old/README html2ps-1.0b7.new/README
--- html2ps-1.0b7.old/README 2011-01-17 21:20:46.000000000 -0200
+++ html2ps-1.0b7.new/README 2011-01-17 21:21:39.000000000 -0200
@@ -14,29 +14,5 @@
contrib/xhtml2ps - A directory containing a GUI frontend for html2ps.
COPYING - GNU General Public License.
README - This file.
-
-Brief history:
-
- 941212 0.1 - First public release - text-only documents.
- 950407 0.2 - Inline images.
- 970609 1.0b - Support for most of HTML 3.2, configuration files introduced.
- 970809 1.0b1 - Bug fixes. Some HTML 4.0 support, e.g. OBJECT, INS, DEL,
- and ACRONYM.
- 000727 1.0b2 - Mostly bug fixes. A title page can be generated. The symbol
- set is extended to include information from META elements.
- Installation script modified for Windows support.
- 000815 1.0b3 - Bug fixes. Some support for Server Side Includes. Form
- element contents can be rendered. Support for netscape
- cookies.
- 050225 1.0b4 Various bug fixes.
- 051211 1.0b5 Bug fixes. Added -M option.
- 091021 1.0b6 "Security" fix. Changed behavior for SSI, to avoid having
- arbitrary readable files disclosed on a web server that uses
- html2ps in a web application (cgi script etc), allowing HTML
- files to be uploaded for conversion. Setting up a service like
- this is begging for trouble in my opinion. (Is /bin/cat also
- a vulnerability, since one can use it in a web app, allowing
- uploading arbitrary parameters to it?)
- 100507 1.0b7 Fixed a bug introduced by the previous bug fix...
Jan K<>rrman
jan@it.uu.se

22
xhtml2ps_defaults.patch Normal file
View File

@@ -0,0 +1,22 @@
From: Ralf Treinen <treinen@debian.org>
Last-Update: 2011-08-06
Description: Set the default postscript viewer in xhtml2ps to "see"
Upstream default doesn't fit well with a Debian system. Using see and
lpr are a better default since they match commands available for
Debian. Bug #72034 has a bigger discussion regarding the subject.
Index: html2ps-1.0b7/contrib/xhtml2ps/xhtml2ps
===================================================================
--- html2ps-1.0b7.orig/contrib/xhtml2ps/xhtml2ps 2011-01-10 02:41:55.000000000 -0200
+++ html2ps-1.0b7/contrib/xhtml2ps/xhtml2ps 2011-01-10 02:44:40.000000000 -0200
@@ -804,8 +804,8 @@
array set stusr {
command "html2ps"
checker "weblint -x Netscape"
- viewer "ghostview -magstep -2 -a4"
- printcmd "lp"
+ viewer "gv -media=a4 -scale -2"
+ printcmd "lpr"
filepcmd "exec cp"
orientation " "
colonnes " "