[Bug 1833627] Re: Xenial regression, unescaped percent pound, dollar sign in doxygen latex output

Daniel Wang daniel.wang at canonical.com
Mon Jun 24 21:20:38 UTC 2019


Backport patches

** Changed in: doxygen (Ubuntu)
       Status: New => Confirmed

** Description changed:

  Description of problem:
  there's a problem to build documentation for the apron package in Xenial. With doxygen 1.8.11, documentation for a certain operator% looks like this:
  
  \subsubsection[{operator%(const texpr1+::builder &a, const texpr1+::builder &b)}]{\setlength{\rightskip}{0pt plus 5cm}texpr1+::builder operator% (
  \begin{DoxyParamCaption}
  \item[{const texpr1+::builder &}]{a, }
  \item[{const texpr1+::builder &}]{b}
  \end{DoxyParamCaption}
  
  That works fine. However, with 1.8.11, this is produced:
  
  \subsubsection[{\texorpdfstring{operator%(const texpr1+::builder &a, const texpr1+::builder &b)}{operator%(const texpr1::builder &a, const texpr1::builder &b)}}]{\setlength{\rightskip}{0pt plus 5cm}texpr1+::builder operator% (
  \begin{DoxyParamCaption}
  \item[{const texpr1+::builder &}]{a, }
  \item[{const texpr1+::builder &}]{b}
  \end{DoxyParamCaption}
  
  The unescaped percent sign in the second argument to \texorpdfstring
  turns the rest of the line into a comment, leading to a LaTeX error.
  
  [Impact]
  
  * This bug cause FTBFS for cimg on Xenial
  
  * This bug has been reported and conformed by Debian
  (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=819606)
  
  * It has been fixed by upstream in the later version
-  - https://github.com/doxygen/doxygen/commit/d59ed22f114398d74d5c3fd1445a7901d26ff93a
-  - https://github.com/doxygen/doxygen/commit/d4ab02c2da7df472bebbf2724419ba00f2de229c
-  - https://github.com/doxygen/doxygen/commit/537a1c67f316c5a9d2d4542e94a4ace439a78b3a
+  - https://github.com/doxygen/doxygen/commit/d59ed22f114398d74d5c3fd1445a7901d26ff93a
+  - https://github.com/doxygen/doxygen/commit/d4ab02c2da7df472bebbf2724419ba00f2de229c
+  - https://github.com/doxygen/doxygen/commit/537a1c67f316c5a9d2d4542e94a4ace439a78b3a
  
  [Test Case]
  
  * When try to build cimg_1.6.5+dfsg-1ubuntu0.1, the following error
  occurs:
  
  !  ==> Fatal error occurred, no output PDF file produced!
  Transcript written on refman.log.
  Makefile:6: recipe for target 'refman.pdf' failed
  make[2]: *** [refman.pdf] Error 1
  make[2]: Leaving directory '/<<BUILDDIR>>/cimg-1.6.5+dfsg/html/latex'
  # autogenerated makefile lacks a final pdflatex call to get references right (that's why the above '|| true')
  cd html/latex && pdflatex refman
  This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdflatex)
-  restricted \write18 enabled.
+  restricted \write18 enabled.
  entering extended mode
  (./refman.tex
  LaTeX2e <2016/02/01>
  
  [Other Info]
  
  * The upstream discussion:
  https://github.com/doxygen/doxygen/issues/5962
+ 
+ [debdiff]
+ 
+ diff -Nru doxygen-1.8.11/debian/changelog doxygen-1.8.11/debian/changelog
+ --- doxygen-1.8.11/debian/changelog	2019-05-30 08:55:06.000000000 -0700
+ +++ doxygen-1.8.11/debian/changelog	2019-06-24 12:22:46.000000000 -0700
+ @@ -1,3 +1,15 @@
+ +doxygen (1.8.11-1ubuntu0.2) xenial; urgency=medium
+ +
+ +  * Backport fix bug:regression, unescaped precent, pound, dollar sign in
+ +    doxygen latex output to a FTBFS for cimg ( LP: #1833627)
+ +  * upstream source:
+ +    - https://github.com/doxygen/doxygen/commit/d59ed22f114398d74d5c3fd1445a7901d26ff93a
+ +    - https://github.com/doxygen/doxygen/commit/d4ab02c2da7df472bebbf2724419ba00f2de229c
+ +    - https://github.com/doxygen/doxygen/commit/537a1c67f316c5a9d2d4542e94a4ace439a78b3a
+ +     
+ +
+ + -- Daniel Wang <daniel.wang at canonical.com>  Thu, 20 Jun 2019 15:31:01 -0700
+ +
+  doxygen (1.8.11-1ubuntu0.1) xenial-security; urgency=medium
+  
+    * SECURITY UPDATE: Cross-site scripting/iframe injection
+ diff -Nru doxygen-1.8.11/debian/patches/fix-regression-unescaped-sign.patch doxygen-1.8.11/debian/patches/fix-regression-unescaped-sign.patch
+ --- doxygen-1.8.11/debian/patches/fix-regression-unescaped-sign.patch	1969-12-31 16:00:00.000000000 -0800
+ +++ doxygen-1.8.11/debian/patches/fix-regression-unescaped-sign.patch	2019-06-24 10:54:36.000000000 -0700
+ @@ -0,0 +1,43 @@
+ +Backport of: https://github.com/doxygen/doxygen/commit/537a1c67f316c5a9d2d4542e94a4ace439a78b3a
+ +From: albert-github <albert.tests at gmail.com>
+ +Date: Sat, 5 Mar 2016 20:35:16 +0100
+ +Date: Sat, 5 Mar 2016 19:42:45 +0100
+ +Subject: [PATCH] Bug 763104 - hyperref link label drop underscores
+ +
+ +Backport of: https://github.com/doxygen/doxygen/commit/d59ed22f114398d74d5c3fd1445a7901d26ff93a
+ +From: albert-github <albert.tests at gmail.com>
+ +Date: Sun, 28 May 2017 13:14:50 +0200
+ +Subject: [PATCH] Bug 783134 - LaTeX output for \tparam block fails to compile
+ + when it contains a \code block
+ +
+ +Backport of: https://github.com/doxygen/doxygen/commit/d59ed22f114398d74d5c3fd1445a7901d26ff93a (partially)
+ +From: albert-github <albert.tests at gmail.com>
+ +Date: Sun, 28 May 2017 13:14:50 +0200
+ +Subject: [PATCH] Bug 783134 - LaTeX output for \tparam block fails to compile
+ + when it contains a \code block
+ +
+ +Index: doxygen-1.8.11/src/util.cpp
+ +===================================================================
+ +--- doxygen-1.8.11.orig/src/util.cpp
+ ++++ doxygen-1.8.11/src/util.cpp
+ +@@ -6550,6 +6550,10 @@ void filterLatexString(FTextStream &t,co
+ +         case '{':  t << "\\{"; break;
+ +         case '}':  t << "\\}"; break;
+ +         case '_':  t << "\\_"; break;
+ ++        case '&':  t << "\\&"; break;
+ ++        case '%':  t << "\\%"; break;
+ ++        case '#':  t << "\\#"; break;
+ ++        case '$':  t << "\\$"; break;
+ +         case ' ':  if (keepSpaces) t << "~"; else t << ' ';
+ +                    break;
+ +         default:
+ +@@ -6730,6 +6734,9 @@ QCString latexEscapePDFString(const char
+ +       case '\\': t << "\\textbackslash{}"; break;
+ +       case '{':  t << "\\{"; break;
+ +       case '}':  t << "\\}"; break;
+ ++      case '_':  t << "\\_"; break;
+ ++      case '%':  t << "\\%"; break;
+ ++      case '&':  t << "\\&"; break;
+ +       default:
+ +         t << c;
+ +         break;
+ diff -Nru doxygen-1.8.11/debian/patches/series doxygen-1.8.11/debian/patches/series
+ --- doxygen-1.8.11/debian/patches/series	2019-05-30 08:52:55.000000000 -0700
+ +++ doxygen-1.8.11/debian/patches/series	2019-06-20 14:56:41.000000000 -0700
+ @@ -10,3 +10,4 @@
+  issue759241.diff
+  pyversion.diff
+  CVE-2016-10245.patch
+ +fix-regression-unescaped-sign.patch

** Description changed:

  Description of problem:
  there's a problem to build documentation for the apron package in Xenial. With doxygen 1.8.11, documentation for a certain operator% looks like this:
  
  \subsubsection[{operator%(const texpr1+::builder &a, const texpr1+::builder &b)}]{\setlength{\rightskip}{0pt plus 5cm}texpr1+::builder operator% (
  \begin{DoxyParamCaption}
  \item[{const texpr1+::builder &}]{a, }
  \item[{const texpr1+::builder &}]{b}
  \end{DoxyParamCaption}
  
  That works fine. However, with 1.8.11, this is produced:
  
  \subsubsection[{\texorpdfstring{operator%(const texpr1+::builder &a, const texpr1+::builder &b)}{operator%(const texpr1::builder &a, const texpr1::builder &b)}}]{\setlength{\rightskip}{0pt plus 5cm}texpr1+::builder operator% (
  \begin{DoxyParamCaption}
  \item[{const texpr1+::builder &}]{a, }
  \item[{const texpr1+::builder &}]{b}
  \end{DoxyParamCaption}
  
  The unescaped percent sign in the second argument to \texorpdfstring
  turns the rest of the line into a comment, leading to a LaTeX error.
  
  [Impact]
  
  * This bug cause FTBFS for cimg on Xenial
  
  * This bug has been reported and conformed by Debian
  (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=819606)
  
  * It has been fixed by upstream in the later version
   - https://github.com/doxygen/doxygen/commit/d59ed22f114398d74d5c3fd1445a7901d26ff93a
   - https://github.com/doxygen/doxygen/commit/d4ab02c2da7df472bebbf2724419ba00f2de229c
   - https://github.com/doxygen/doxygen/commit/537a1c67f316c5a9d2d4542e94a4ace439a78b3a
  
  [Test Case]
  
  * When try to build cimg_1.6.5+dfsg-1ubuntu0.1, the following error
  occurs:
  
  !  ==> Fatal error occurred, no output PDF file produced!
  Transcript written on refman.log.
  Makefile:6: recipe for target 'refman.pdf' failed
  make[2]: *** [refman.pdf] Error 1
  make[2]: Leaving directory '/<<BUILDDIR>>/cimg-1.6.5+dfsg/html/latex'
  # autogenerated makefile lacks a final pdflatex call to get references right (that's why the above '|| true')
  cd html/latex && pdflatex refman
  This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdflatex)
   restricted \write18 enabled.
  entering extended mode
  (./refman.tex
  LaTeX2e <2016/02/01>
  
  [Other Info]
  
  * The upstream discussion:
  https://github.com/doxygen/doxygen/issues/5962
- 
- [debdiff]
- 
- diff -Nru doxygen-1.8.11/debian/changelog doxygen-1.8.11/debian/changelog
- --- doxygen-1.8.11/debian/changelog	2019-05-30 08:55:06.000000000 -0700
- +++ doxygen-1.8.11/debian/changelog	2019-06-24 12:22:46.000000000 -0700
- @@ -1,3 +1,15 @@
- +doxygen (1.8.11-1ubuntu0.2) xenial; urgency=medium
- +
- +  * Backport fix bug:regression, unescaped precent, pound, dollar sign in
- +    doxygen latex output to a FTBFS for cimg ( LP: #1833627)
- +  * upstream source:
- +    - https://github.com/doxygen/doxygen/commit/d59ed22f114398d74d5c3fd1445a7901d26ff93a
- +    - https://github.com/doxygen/doxygen/commit/d4ab02c2da7df472bebbf2724419ba00f2de229c
- +    - https://github.com/doxygen/doxygen/commit/537a1c67f316c5a9d2d4542e94a4ace439a78b3a
- +     
- +
- + -- Daniel Wang <daniel.wang at canonical.com>  Thu, 20 Jun 2019 15:31:01 -0700
- +
-  doxygen (1.8.11-1ubuntu0.1) xenial-security; urgency=medium
-  
-    * SECURITY UPDATE: Cross-site scripting/iframe injection
- diff -Nru doxygen-1.8.11/debian/patches/fix-regression-unescaped-sign.patch doxygen-1.8.11/debian/patches/fix-regression-unescaped-sign.patch
- --- doxygen-1.8.11/debian/patches/fix-regression-unescaped-sign.patch	1969-12-31 16:00:00.000000000 -0800
- +++ doxygen-1.8.11/debian/patches/fix-regression-unescaped-sign.patch	2019-06-24 10:54:36.000000000 -0700
- @@ -0,0 +1,43 @@
- +Backport of: https://github.com/doxygen/doxygen/commit/537a1c67f316c5a9d2d4542e94a4ace439a78b3a
- +From: albert-github <albert.tests at gmail.com>
- +Date: Sat, 5 Mar 2016 20:35:16 +0100
- +Date: Sat, 5 Mar 2016 19:42:45 +0100
- +Subject: [PATCH] Bug 763104 - hyperref link label drop underscores
- +
- +Backport of: https://github.com/doxygen/doxygen/commit/d59ed22f114398d74d5c3fd1445a7901d26ff93a
- +From: albert-github <albert.tests at gmail.com>
- +Date: Sun, 28 May 2017 13:14:50 +0200
- +Subject: [PATCH] Bug 783134 - LaTeX output for \tparam block fails to compile
- + when it contains a \code block
- +
- +Backport of: https://github.com/doxygen/doxygen/commit/d59ed22f114398d74d5c3fd1445a7901d26ff93a (partially)
- +From: albert-github <albert.tests at gmail.com>
- +Date: Sun, 28 May 2017 13:14:50 +0200
- +Subject: [PATCH] Bug 783134 - LaTeX output for \tparam block fails to compile
- + when it contains a \code block
- +
- +Index: doxygen-1.8.11/src/util.cpp
- +===================================================================
- +--- doxygen-1.8.11.orig/src/util.cpp
- ++++ doxygen-1.8.11/src/util.cpp
- +@@ -6550,6 +6550,10 @@ void filterLatexString(FTextStream &t,co
- +         case '{':  t << "\\{"; break;
- +         case '}':  t << "\\}"; break;
- +         case '_':  t << "\\_"; break;
- ++        case '&':  t << "\\&"; break;
- ++        case '%':  t << "\\%"; break;
- ++        case '#':  t << "\\#"; break;
- ++        case '$':  t << "\\$"; break;
- +         case ' ':  if (keepSpaces) t << "~"; else t << ' ';
- +                    break;
- +         default:
- +@@ -6730,6 +6734,9 @@ QCString latexEscapePDFString(const char
- +       case '\\': t << "\\textbackslash{}"; break;
- +       case '{':  t << "\\{"; break;
- +       case '}':  t << "\\}"; break;
- ++      case '_':  t << "\\_"; break;
- ++      case '%':  t << "\\%"; break;
- ++      case '&':  t << "\\&"; break;
- +       default:
- +         t << c;
- +         break;
- diff -Nru doxygen-1.8.11/debian/patches/series doxygen-1.8.11/debian/patches/series
- --- doxygen-1.8.11/debian/patches/series	2019-05-30 08:52:55.000000000 -0700
- +++ doxygen-1.8.11/debian/patches/series	2019-06-20 14:56:41.000000000 -0700
- @@ -10,3 +10,4 @@
-  issue759241.diff
-  pyversion.diff
-  CVE-2016-10245.patch
- +fix-regression-unescaped-sign.patch

** Patch added: "doxygen_1.8.11-1ubuntu0.2.debdiff"
   https://bugs.launchpad.net/ubuntu/+source/doxygen/+bug/1833627/+attachment/5272905/+files/doxygen_1.8.11-1ubuntu0.2.debdiff

** Description changed:

  Description of problem:
  there's a problem to build documentation for the apron package in Xenial. With doxygen 1.8.11, documentation for a certain operator% looks like this:
  
  \subsubsection[{operator%(const texpr1+::builder &a, const texpr1+::builder &b)}]{\setlength{\rightskip}{0pt plus 5cm}texpr1+::builder operator% (
  \begin{DoxyParamCaption}
  \item[{const texpr1+::builder &}]{a, }
  \item[{const texpr1+::builder &}]{b}
  \end{DoxyParamCaption}
  
  That works fine. However, with 1.8.11, this is produced:
  
  \subsubsection[{\texorpdfstring{operator%(const texpr1+::builder &a, const texpr1+::builder &b)}{operator%(const texpr1::builder &a, const texpr1::builder &b)}}]{\setlength{\rightskip}{0pt plus 5cm}texpr1+::builder operator% (
  \begin{DoxyParamCaption}
  \item[{const texpr1+::builder &}]{a, }
  \item[{const texpr1+::builder &}]{b}
  \end{DoxyParamCaption}
  
  The unescaped percent sign in the second argument to \texorpdfstring
  turns the rest of the line into a comment, leading to a LaTeX error.
  
  [Impact]
  
  * This bug cause FTBFS for cimg on Xenial
  
  * This bug has been reported and conformed by Debian
  (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=819606)
  
  * It has been fixed by upstream in the later version
   - https://github.com/doxygen/doxygen/commit/d59ed22f114398d74d5c3fd1445a7901d26ff93a
   - https://github.com/doxygen/doxygen/commit/d4ab02c2da7df472bebbf2724419ba00f2de229c
   - https://github.com/doxygen/doxygen/commit/537a1c67f316c5a9d2d4542e94a4ace439a78b3a
  
  [Test Case]
  
- * When try to build cimg_1.6.5+dfsg-1ubuntu0.1, the following error
+ * When trying to build cimg_1.6.5+dfsg-1ubuntu0.1, the following error
  occurs:
  
  !  ==> Fatal error occurred, no output PDF file produced!
  Transcript written on refman.log.
  Makefile:6: recipe for target 'refman.pdf' failed
  make[2]: *** [refman.pdf] Error 1
  make[2]: Leaving directory '/<<BUILDDIR>>/cimg-1.6.5+dfsg/html/latex'
  # autogenerated makefile lacks a final pdflatex call to get references right (that's why the above '|| true')
  cd html/latex && pdflatex refman
  This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdflatex)
   restricted \write18 enabled.
  entering extended mode
  (./refman.tex
  LaTeX2e <2016/02/01>
  
  [Other Info]
  
  * The upstream discussion:
  https://github.com/doxygen/doxygen/issues/5962

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to doxygen in Ubuntu.
https://bugs.launchpad.net/bugs/1833627

Title:
  Xenial regression, unescaped percent pound, dollar sign in doxygen
  latex output

Status in doxygen package in Ubuntu:
  Confirmed

Bug description:
  Description of problem:
  there's a problem to build documentation for the apron package in Xenial. With doxygen 1.8.11, documentation for a certain operator% looks like this:

  \subsubsection[{operator%(const texpr1+::builder &a, const texpr1+::builder &b)}]{\setlength{\rightskip}{0pt plus 5cm}texpr1+::builder operator% (
  \begin{DoxyParamCaption}
  \item[{const texpr1+::builder &}]{a, }
  \item[{const texpr1+::builder &}]{b}
  \end{DoxyParamCaption}

  That works fine. However, with 1.8.11, this is produced:

  \subsubsection[{\texorpdfstring{operator%(const texpr1+::builder &a, const texpr1+::builder &b)}{operator%(const texpr1::builder &a, const texpr1::builder &b)}}]{\setlength{\rightskip}{0pt plus 5cm}texpr1+::builder operator% (
  \begin{DoxyParamCaption}
  \item[{const texpr1+::builder &}]{a, }
  \item[{const texpr1+::builder &}]{b}
  \end{DoxyParamCaption}

  The unescaped percent sign in the second argument to \texorpdfstring
  turns the rest of the line into a comment, leading to a LaTeX error.

  [Impact]

  * This bug cause FTBFS for cimg on Xenial

  * This bug has been reported and conformed by Debian
  (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=819606)

  * It has been fixed by upstream in the later version
   - https://github.com/doxygen/doxygen/commit/d59ed22f114398d74d5c3fd1445a7901d26ff93a
   - https://github.com/doxygen/doxygen/commit/d4ab02c2da7df472bebbf2724419ba00f2de229c
   - https://github.com/doxygen/doxygen/commit/537a1c67f316c5a9d2d4542e94a4ace439a78b3a

  [Regression Potential]

  * Regression potential is low

  * The patch filters adds escapes for '&', '$', '%', '#' when
  generating latex documentation. The change is tiny and these changes
  are already in the later version

  * With the patch the cimg_1.6.5+dfsg-1ubuntu0.1 documentation can
  build without issues

  [Test Case]

  * When try to build cimg_1.6.5+dfsg-1ubuntu0.1, the following error
  occurs:

  !  ==> Fatal error occurred, no output PDF file produced!
  Transcript written on refman.log.
  Makefile:6: recipe for target 'refman.pdf' failed
  make[2]: *** [refman.pdf] Error 1
  make[2]: Leaving directory '/<<BUILDDIR>>/cimg-1.6.5+dfsg/html/latex'
  # autogenerated makefile lacks a final pdflatex call to get references right (that's why the above '|| true')
  cd html/latex && pdflatex refman
  This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian) (preloaded format=pdflatex)
   restricted \write18 enabled.
  entering extended mode
  (./refman.tex
  LaTeX2e <2016/02/01>

  [Other Info]

  * The upstream discussion:
  https://github.com/doxygen/doxygen/issues/5962

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/doxygen/+bug/1833627/+subscriptions



More information about the foundations-bugs mailing list