summaryrefslogtreecommitdiff
path: root/app-text/info2html
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-text/info2html
reinit the tree, so we can have metadata
Diffstat (limited to 'app-text/info2html')
-rw-r--r--app-text/info2html/Manifest6
-rw-r--r--app-text/info2html/files/info2html-2.0-xss.patch61
-rw-r--r--app-text/info2html/info2html-2.0.ebuild71
-rw-r--r--app-text/info2html/metadata.xml11
4 files changed, 149 insertions, 0 deletions
diff --git a/app-text/info2html/Manifest b/app-text/info2html/Manifest
new file mode 100644
index 000000000000..412f83fbead7
--- /dev/null
+++ b/app-text/info2html/Manifest
@@ -0,0 +1,6 @@
+AUX info2html-2.0-xss.patch 2206 SHA256 a243877e41fdd7b5174b89a58e1f8d7d0afb5a2bfef4e7a6cc591e02287cf98f SHA512 9ffdd82d6cd0f53473fa8eedd5372c09b3a0a2f2b59bea229320fb77bf07d9f9a9f6892585250cd9fa5034213b2b08a346e739ae931c6a42bbdc73487348b947 WHIRLPOOL cf6224069af3a6b09eaef177b501c474d9b69d639e3364b8a7e7183f606c44c27e188be182cf34c198ddb1fb3b6110ec255198f75f0a3f75310962704f1b2351
+DIST info2html-2.0.tar 51200 SHA256 553f4d17e7edc13e5d27ae66e27b8702e1e83691adb3505a26e3af70276f84a5 SHA512 1b9ebc8bdd4101d24116fe22df9e5d3124300b2ac11585d8c7fff9652f7984983480442af9d9f86300f9684335d85b96f276a775c56c95e7fac85ebc46235e06 WHIRLPOOL b8212904cd11434479bdca42575818c73d5eef8d4e52fb8d980533ff27bdfb22db043352ba6a435c028aadd9ef8bffae440baebc8e296d7d8c555977ec89317a
+EBUILD info2html-2.0.ebuild 1928 SHA256 7ef0e99cd0c786e1aa2b39da287c27a23b6fb7d1a50ec49e2252d45d15984488 SHA512 4e8b599429cf76c26a909d0aa93072bc1033e4c6a8a454cca4aa6e2440668e55c7f762f486ffcb19a4d64375dbad0c5cc73157471a207623d502b0f08846ac10 WHIRLPOOL 61ba12a94f51bcfb4e165eed5077acb026b426fd2658220ecef624e13173170b983c333f87e461d2ddb06a8468a1196495d75c30eb6285520837600a7ccc3ec1
+MISC ChangeLog 2461 SHA256 ee4c8623581e6749189a01266ea07bc5b9f80820d52acdaee80f76330826cff8 SHA512 548ee8ac9e57f6ef341dabe2f7061bf81b99d340eed85f513799d1ee1265b8cfe3a578b876080aae233601d2867ea1c9735031f088f2c6ff2c30066f5c75f702 WHIRLPOOL 3050906486163682f22399af9f63c11dbc1ce42fbcf2a0328d08da916a634f7b58c39ed90ad3d2f9475d78eba914b10410f5c192a30c613b29f626864b3ea3bb
+MISC ChangeLog-2015 3402 SHA256 f1e881fe41071727656873d38d4bc72ce60db4f6d4c19f362cd36186c7900753 SHA512 c898ae835d8101ddbb165ab169e6ca899583ab1836249dad97efed974ee6a6984982724fddff762dc0c284961c7caed946117ab23285ec106e258ffa7567624c WHIRLPOOL f36ce72b3cfa7beb20da357d541713b9cbef485ee55e75e142114ca5f584964d610997d96fbcb1afabe9385b4eb64569828dea779640cbe9c3cd8f0f83cda3f0
+MISC metadata.xml 329 SHA256 e792e5d71d2f0eee2d2feec311c70a76d1734cedfb263f752b02e0a90707fe12 SHA512 18e0083cb85393d3d92abda8016dcdebe9f84fcd176557cb433b858ed9b6087ce7e5b53022d689e3861526d10440a9fe7fd6a1d86782a76d8f0756c3046bae23 WHIRLPOOL 0b580c549f5ea00338bf9905e07cab9853416e1dccabdcadbf2b5d835268ecd657d66de6440689c7feb36efad303f34e9ab69b1da8de576707c0fe8a8cc2d3d8
diff --git a/app-text/info2html/files/info2html-2.0-xss.patch b/app-text/info2html/files/info2html-2.0-xss.patch
new file mode 100644
index 000000000000..a2254bdbbe2b
--- /dev/null
+++ b/app-text/info2html/files/info2html-2.0-xss.patch
@@ -0,0 +1,61 @@
+diff -u info2html-2.0-orig/info2html info2html-2.0/info2html
+--- info2html-2.0-orig/info2html 2006-09-01 14:55:13.000000000 +0200
++++ info2html-2.0/info2html 2006-09-01 15:05:41.000000000 +0200
+@@ -42,7 +42,7 @@
+
+ use CGI;
+ $ENV{'REQUEST_METHOD'} or
+- print "Note: I'm really supposed to be run as a CGI!\n";
++ print "Note: I'm really supposed to be run as a CGI\!\n";
+
+ #-- patterns
+ $NODEBORDER = '\037\014?'; #-- delimiter of an info node
+@@ -62,7 +62,7 @@
+ #---------------------------------------------------------
+ # Don't reveal where we're looking... --jonh 5/20/97 (and reapplied 5/4/1998)
+ sub DieFileNotFound{
+- local($FileName) = @_;
++ local($FileName) = &XssEscape(@_);
+ #-- TEXT : error message if a file could not be opened
+ print <<"EOF";
+ <html><head><title>Info Files - Error Message</title>
+@@ -104,6 +104,28 @@
+ }
+
+ #----------------------------------------------------------
++# XssEscape
++#----------------------------------------------------------
++sub XssEscape {
++ local($Tag) = @_;
++ #-- output escaping is required to protect browser
++ # against `cross site' and `cross frame scripting'
++
++ $Tag =~ s/&/&amp;/gs; # ampersand
++ $Tag =~ s/#/&#35;/gs;
++ $Tag =~ s/;/&#59;/gs;
++ $Tag =~ s/[\000-\037\177-\237]/&iquest;/gs; # "ctrl" codes 0-31 and 127-159
++ $Tag =~ s/</&lt;/gs; # less-than symbol
++ $Tag =~ s/>/&gt;/gs; # greater-than symbol
++ $Tag =~ s/"/&quot;/gs; # double quote
++ $Tag =~ s/\240/&nbsp;/gs; # non-breaking space
++ $Tag =~ s/\255/&shy;/gs; # soft hyphen
++ # the rest is interpreted
++ # as ISO 8859-1
++ $Tag;
++}
++
++#----------------------------------------------------------
+ # ParsHeaderToken
+ #----------------------------------------------------------
+ # Parses the heaer line of an info node for a specific
+@@ -493,6 +515,8 @@
+ #----------------------------------------------------------
+ sub ReplyNotFoundMessage{
+ local($FileName,$Tag) = @_;
++ $FileName = &XssEscape($FileName);
++ $Tag = &XssEscape($Tag);
+ print <<"EOF";
+ <html><head><title>Info Files - Error Message</title>
+ $BOTS_STAY_AWAY
+Only in info2html-2.0: info2html.orig
+Only in info2html-2.0: info2html.rej
diff --git a/app-text/info2html/info2html-2.0.ebuild b/app-text/info2html/info2html-2.0.ebuild
new file mode 100644
index 000000000000..f106bc188e13
--- /dev/null
+++ b/app-text/info2html/info2html-2.0.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils webapp
+
+DESCRIPTION="Converts GNU .info files to HTML"
+HOMEPAGE="http://info2html.sourceforge.net/"
+SRC_URI="mirror://sourceforge/info2html/${P}.tar"
+
+LICENSE="freedist"
+# webapp.eclass deals with SLOTting
+#SLOT="0"
+IUSE=""
+KEYWORDS="alpha amd64 hppa sparc x86"
+
+RDEPEND="dev-lang/perl"
+
+src_unpack() {
+ local infos state line i
+ unpack ${A}
+ cd ${S}
+
+ # filter user-provided data to prevent cross-frame/site scripting attacks
+ # bug #91354 (fix from Werner Fink)
+ epatch "${FILESDIR}"/info2html-2.0-xss.patch
+
+ # Fixup INFODIR for paths in /etc/profile.env INFOPATH
+ infos=$(grep "^export INFOPATH=" /etc/profile.env | tail -n 1 |\
+ sed -e "s:^export INFOPATH=:INFOPATH=:;s:'::g")
+ # Default path to /usr/share/info and /usr/local/share/info
+ [[ -z ${infos} ]] && export infos="/usr/share/info"
+ infos=( ${INFOPATH//:/ } )
+ mv ${S}/info2html.conf ${S}/info2html.conf.orig
+ touch ${S}/info2html.conf
+ state="copy"
+ inserted="no"
+ while read line; do
+ [[ ${line} == "@INFODIR = (" ]] && state="insert"
+ [[ ${line} == ");" ]] && state="copy"
+ case ${state} in
+ "copy")
+ echo ${line} >> ${S}/info2html.conf
+ ;;
+ "insert")
+ echo ${line} >> ${S}/info2html.conf
+ for info in "${infos[@]}"; do
+ echo " '${info}'," >> ${S}/info2html.conf
+ done
+ echo " '/usr/local/share/info'" >> ${S}/info2html.conf
+ state="skip"
+ inserted="yes"
+ ;;
+ "skip")
+ ;;
+ esac
+ done < ${S}/info2html.conf.orig
+ [[ ${state} == "copy" && ${inserted} == "yes" ]] ||
+ die "Setting up info2html.conf failed"
+}
+
+src_install() {
+ webapp_src_preinst
+
+ exeinto ${MY_CGIBINDIR}
+ cp info2html infocat info2html.css info2html.conf ${D}/${MY_CGIBINDIR}
+ # README zapped by info2html-gentoo.patch; it only listed
+ # the homepage so it doesn't add anything useful.
+ # dodoc README
+
+ webapp_src_install
+}
diff --git a/app-text/info2html/metadata.xml b/app-text/info2html/metadata.xml
new file mode 100644
index 000000000000..5020ed8cb0fc
--- /dev/null
+++ b/app-text/info2html/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>web-apps@gentoo.org</email>
+ <name>Gentoo Webapps</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">info2html</remote-id>
+ </upstream>
+</pkgmetadata>