Processed: Re: Bug#610220: Show URLs in TODO/NOTE as hyperlinks in the web view
Processing control commands: > retitle -1 url parsing of notes only works with one url per note Bug #610220 [security-tracker] Show URLs in TODO/NOTE as hyperlinks in the web view Changed Bug title to 'url parsing of notes only works with one url per note' from 'Show URLs in TODO/NOTE as hyperlinks in the web view' -- 610220: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=610220 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems -- To UNSUBSCRIBE, email to debian-security-tracker-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/handler.s.b610220.141081759028250.transcr...@bugs.debian.org
Bug#610220: Show URLs in TODO/NOTE as hyperlinks in the web view
control: retitle -1 url parsing of notes only works with one url per note Hi, On Montag, 15. September 2014, Salvatore Bonaccorso wrote: > Activated that change (not closing the bug, as there is still one part > to be addressed possibly). pffft, I would have closed the bug ;-) Anyhow, this is the line which needs to be fixed, if thats possible with regexes: results=re.search("(.*)(?Phttps?://[^\s]+)(.*)", line) which is then interated through, with "for group in results.groups():"... So the problem is because the regex above only matches one http(s)-URL, not several occurances, resulting in more objects in results.groups(). Is such an regex possible? cheers, Holger signature.asc Description: This is a digitally signed message part.
Bug#610220: Show URLs in TODO/NOTE as hyperlinks in the web view
Hi, On Mon, Sep 15, 2014 at 07:59:53PM +0200, Holger Levsen wrote: > Hi Salvatore, > > On Montag, 15. September 2014, Salvatore Bonaccorso wrote: > > > https://security-tracker.debian.org/tracker/CVE-2011-2825 > > hmpf, that works for 1 out 3, the other 2 are detected as one :/ > > > We only have a handfull of those, so: If you find a solution to catch > > also these then good. Otherwise we will need to workaround. Do you > > have an idea to catch also these? > > no yet... > > > Please commit this change, I will activate it on the security-tracker. > > ...but I will commit now and then will see if I find the cause why > CVE-2011-2825 isnt displayed properly :) Activated that change (not closing the bug, as there is still one part to be addressed possibly). Thanks for your work, Regards, Salvatore -- To UNSUBSCRIBE, email to debian-security-tracker-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20140915181233.GA19840@eldamar.local
Bug#610220: Show URLs in TODO/NOTE as hyperlinks in the web view
Hi Salvatore, On Montag, 15. September 2014, Salvatore Bonaccorso wrote: > > https://security-tracker.debian.org/tracker/CVE-2011-2825 hmpf, that works for 1 out 3, the other 2 are detected as one :/ > We only have a handfull of those, so: If you find a solution to catch > also these then good. Otherwise we will need to workaround. Do you > have an idea to catch also these? no yet... > Please commit this change, I will activate it on the security-tracker. ...but I will commit now and then will see if I find the cause why CVE-2011-2825 isnt displayed properly :) cheers, Holger signature.asc Description: This is a digitally signed message part.
Bug#610220: Show URLs in TODO/NOTE as hyperlinks in the web view
Hi Holger, On Mon, Sep 15, 2014 at 06:05:29PM +0200, Salvatore Bonaccorso wrote: > Hi Holger, > > On Mon, Sep 15, 2014 at 03:30:05PM +0200, Holger Levsen wrote: > > Hi, > > > > On Montag, 15. September 2014, Salvatore Bonaccorso wrote: > > > Hmm, would something wrapping around of the following work? > > > > sounds like a good start... > > > > > Considering there might be more than one matching group in each line, > > > so the example holds only for a simplest case again :( > > > > are there really examples with two urls in one line? > > We have, e.g. > > https://security-tracker.debian.org/tracker/CVE-2011-2825 > > But if that will not work, I think we can workaround and split these > lines when we encounter them. If we can find a working solution then > better clearly :) We only have a handfull of those, so: If you find a solution to catch also these then good. Otherwise we will need to workaround. Do you have an idea to catch also these? Please commit this change, I will activate it on the security-tracker. Regards, Salvatore -- To UNSUBSCRIBE, email to debian-security-tracker-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20140915162538.GA9439@eldamar.local
Bug#610220: Show URLs in TODO/NOTE as hyperlinks in the web view
Hi Holger, On Mon, Sep 15, 2014 at 03:30:05PM +0200, Holger Levsen wrote: > Hi, > > On Montag, 15. September 2014, Salvatore Bonaccorso wrote: > > Hmm, would something wrapping around of the following work? > > sounds like a good start... > > > Considering there might be more than one matching group in each line, > > so the example holds only for a simplest case again :( > > are there really examples with two urls in one line? We have, e.g. https://security-tracker.debian.org/tracker/CVE-2011-2825 But if that will not work, I think we can workaround and split these lines when we encounter them. If we can find a working solution then better clearly :) Regards, Salvatore -- To UNSUBSCRIBE, email to debian-security-tracker-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20140915160529.GA7462@eldamar.local
Bug#610220: Show URLs in TODO/NOTE as hyperlinks in the web view
On Mon, September 15, 2014 16:07, Holger Levsen wrote: > control: tags -1 + pending > > Hi, > > see attached. This version also deals with several URLs in one note :) > > It also works for all three recent examples of Salvatore. Go Thijs -- To UNSUBSCRIBE, email to debian-security-tracker-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/70767408995ac15449968d57675ef506.squir...@aphrodite.kinkhorst.nl
Processed: Re: Bug#610220: Show URLs in TODO/NOTE as hyperlinks in the web view
Processing control commands: > tags -1 + pending Bug #610220 [security-tracker] Show URLs in TODO/NOTE as hyperlinks in the web view Added tag(s) pending. -- 610220: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=610220 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems -- To UNSUBSCRIBE, email to debian-security-tracker-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/handler.s.b610220.141079005825508.transcr...@bugs.debian.org
Bug#610220: Show URLs in TODO/NOTE as hyperlinks in the web view
control: tags -1 + pending Hi, see attached. This version also deals with several URLs in one note :) It also works for all three recent examples of Salvatore. cheers, Holger From 7b4ea6cc46ffc1a507d94c2a13ef3c27e3123031 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sat, 13 Sep 2014 00:56:17 +0200 Subject: [PATCH 1/8] Show URLs in TODO/NOTE as hyperlinks in the web view. (Closes: #610220) --- lib/python/web_support.py | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/lib/python/web_support.py b/lib/python/web_support.py index 72a4932..f1663a3 100644 --- a/lib/python/web_support.py +++ b/lib/python/web_support.py @@ -453,12 +453,21 @@ def make_table(contents, caption=None, replacement=None, introduction=None): def make_pre(lines): """Creates a pre-formatted text area.""" -r = [] -append = r.append -for l in lines: -append(l) -append('\n') -return tag('pre', ''.join(r)) +pre = [] +append = pre.append +for line in lines: +# turn https:// and http:// into links +results=re.search("(.*)(?Phttps?://[^\s]+)(.*)", line) +if results: +for group in results.groups(): +if group.startswith('http://') or group.startswith('https://'): +append(A(group)) +else: +append(group) +else: +append(line) +append(BR()) +return tag('pre', pre) def make_menu(convert, *entries): """Creates an unnumbered list of hyperlinks. -- 1.9.1 signature.asc Description: This is a digitally signed message part.
Bug#610220: Show URLs in TODO/NOTE as hyperlinks in the web view
Hi, On Montag, 15. September 2014, Salvatore Bonaccorso wrote: > Hmm, would something wrapping around of the following work? sounds like a good start... > Considering there might be more than one matching group in each line, > so the example holds only for a simplest case again :( are there really examples with two urls in one line? > cut-cut-cut-cut-cut-cut- > import re > string = "Fixed by > https://git.kernel.org/linus/57e68e9cd65b4b8eb4045a1e0d0746458502554c > (v3.15-rc1)" print re.search("(?Phttps?://[^\s]+)", > string).group("url") thats nice, now we just need the part before and after that match ;) cheers, Holger signature.asc Description: This is a digitally signed message part.
Bug#610220: Show URLs in TODO/NOTE as hyperlinks in the web view
Hi Holger, On Mon, Sep 15, 2014 at 02:32:54PM +0200, Holger Levsen wrote: > On Samstag, 13. September 2014, Salvatore Bonaccorso wrote: > > I had a look at this patch. It can only address isolated URLs in the > > notes this way. We usually use this in other ways, one example is that > > was Florian mentioned in the first message: > > - https://security-tracker.debian.org/tracker/CVE-2014-3122 > > right, thanks for this example. I'll wrap regexes around my head til it > matches - or so :-) Hmm, would something wrapping around of the following work? Considering there might be more than one matching group in each line, so the example holds only for a simplest case again :( cut-cut-cut-cut-cut-cut- import re string = "Fixed by https://git.kernel.org/linus/57e68e9cd65b4b8eb4045a1e0d0746458502554c (v3.15-rc1)" print re.search("(?Phttps?://[^\s]+)", string).group("url") cut-cut-cut-cut-cut-cut- > > Thanks for also looking into this one! > > my pleasure, thank you all very much for many years of working on all these > security issues! I can now slightly better appreciate what huge task you're > working on! Thanks Holger! Regards, Salvatore -- To UNSUBSCRIBE, email to debian-security-tracker-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20140915125654.ga22...@lorien.valinor.li
Bug#610220: Show URLs in TODO/NOTE as hyperlinks in the web view
Hi, On Samstag, 13. September 2014, Salvatore Bonaccorso wrote: > I had a look at this patch. It can only address isolated URLs in the > notes this way. We usually use this in other ways, one example is that > was Florian mentioned in the first message: > - https://security-tracker.debian.org/tracker/CVE-2014-3122 right, thanks for this example. I'll wrap regexes around my head til it matches - or so :-) > Thanks for also looking into this one! my pleasure, thank you all very much for many years of working on all these security issues! I can now slightly better appreciate what huge task you're working on! cheers, Holger signature.asc Description: This is a digitally signed message part.
Processed: Re: Bug#610220: Show URLs in TODO/NOTE as hyperlinks in the web view
Processing control commands: > tags -1 - pending Bug #610220 [security-tracker] Show URLs in TODO/NOTE as hyperlinks in the web view Removed tag(s) pending. -- 610220: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=610220 Debian Bug Tracking System Contact ow...@bugs.debian.org with problems -- To UNSUBSCRIBE, email to debian-security-tracker-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/handler.s.b610220.14105893491552.transcr...@bugs.debian.org
Bug#610220: Show URLs in TODO/NOTE as hyperlinks in the web view
Control: tags -1 - pending Hi Holger, On Fri, Sep 12, 2014 at 12:19:06PM +0200, Holger Levsen wrote: > attached is a patch to lib/python/web_support.py which turns the notes (used > in CVEs) into hyperlinks - if they start with http(s):// > > Please tell me whether it's ok to commit this. I had a look at this patch. It can only address isolated URLs in the notes this way. We usually use this in other ways, one example is that was Florian mentioned in the first message: Note: see https:// which should turn into see http://www.example.com/info.html Other examples were we use the free form extensively is when we document which commits introduced a given problem, where fixed, etc: I'm adding also the corresponding note, as this might change when looking next time into it: - https://security-tracker.debian.org/tracker/CVE-2014-3620 NOTE: http://curl.haxx.se/docs/adv_20140910B.html NOTE: Introduced by https://github.com/bagder/curl/commit/85b9dc8023 - https://security-tracker.debian.org/tracker/CVE-2014-3145 NOTE: Upstream fix https://git.kernel.org/linus/05ab8f2647e4221cbdb3856dd7d32bd5407316b3 NOTE: Introduced by https://git.kernel.org/linus/4738c1db1593687713869fa69e733eebc7b0d6d8 NOTE: https://git.kernel.org/linus/d214c7537bbf2f247991fb65b3420b0b3d712c67 - https://security-tracker.debian.org/tracker/CVE-2014-3122 NOTE: Introduced by https://git.kernel.org/linus/b291f000393f5a0b679012b39d79fbc85c018233 NOTE: Fixed by https://git.kernel.org/linus/57e68e9cd65b4b8eb4045a1e0d0746458502554c (v3.15-rc1) the last one is particulary interessant as it contains normal text before, and after a reference which should be turned into a link. There is one other problematic example with the patch, where we have notes starting with http(s), but adding explanations/further text afterwards: - https://security-tracker.debian.org/tracker/CVE-2014-6387 NOTE: http://www.mantisbt.org/bugs/view.php?id=17640 NOTE: http://github.com/mantisbt/mantisbt/commit/215968fa8 (1.2.x branch) NOTE: http://github.com/mantisbt/mantisbt/commit/fc02c46ee (master branch) So we would need something more complicated here, isolating first the urls in the text and converting that part, but keeping the surrounding ones. Thanks for also looking into this one! Regards, Salvatore -- To UNSUBSCRIBE, email to debian-security-tracker-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20140913062217.GA12503@eldamar.local
Bug#610220: Show URLs in TODO/NOTE as hyperlinks in the web view
Hi, attached is a patch to lib/python/web_support.py which turns the notes (used in CVEs) into hyperlinks - if they start with http(s):// Please tell me whether it's ok to commit this. cheers, Holger Index: lib/python/web_support.py === --- lib/python/web_support.py (Revision 28738) +++ lib/python/web_support.py (Arbeitskopie) @@ -453,12 +453,16 @@ def make_pre(lines): """Creates a pre-formatted text area.""" -r = [] -append = r.append +pre = [] +append = pre.append for l in lines: -append(l) -append('\n') -return tag('pre', ''.join(r)) +# please tell me once gopher:// is back +if l.startswith('http://') or l.startswith('https://'): +append(A(l)) +else: +append(l) +append(BR()) +return tag('pre', pre) def make_menu(convert, *entries): """Creates an unnumbered list of hyperlinks. signature.asc Description: This is a digitally signed message part.
Bug#610220: Show URLs in TODO/NOTE as hyperlinks in the web view
Package: security-tracker Severity: wishlist "NOTE: see http://www.example.com/info.html"; should render as "NOTE: see http://www.example.com/info.html" or something similar. -- To UNSUBSCRIBE, email to debian-security-tracker-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/877he5w1gp@mid.deneb.enyo.de