show IDS rule names correctly in WebUI log

Message ID 20171119180410.4d2727aa.peter.mueller@link38.eu
State Superseded
Headers
Series show IDS rule names correctly in WebUI log |

Commit Message

Peter Müller Nov. 20, 2017, 4:04 a.m. UTC
  Fixes #11519.

Signed-off-by: Peter Müller <peter.mueller@link38.eu>
---
 html/cgi-bin/logs.cgi/ids.dat | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Michael Tremer Nov. 21, 2017, 2:49 a.m. UTC | #1
Hello,

can you explain what this patch is supposed to change?

-Michael

On Sun, 2017-11-19 at 18:04 +0100, Peter Müller wrote:
> Fixes #11519.
> 
> Signed-off-by: Peter Müller <peter.mueller@link38.eu>
> ---
>  html/cgi-bin/logs.cgi/ids.dat | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/html/cgi-bin/logs.cgi/ids.dat b/html/cgi-bin/logs.cgi/ids.dat
> index 44b3abdac..98176d690 100644
> --- a/html/cgi-bin/logs.cgi/ids.dat
> +++ b/html/cgi-bin/logs.cgi/ids.dat
> @@ -387,7 +387,7 @@ sub processevent
>  				}
>  				($title,$classification,$priority,$date,$time
> ,$srcip,$srcport,$destip,$destport, $sid) =
> ("n/a","n/a","n/a","n/a","n/a","n/a","n/a","n/a","n/a", "n/a");
>  				@refs = ();
> -				$_ =~ m/:([0-9]{1,4})\] (.*) \[\*\*\]/;
> +				$_ =~ m/:([0-9]{1,5})\] (.*) \[\*\*\]/;
>  				$title = &Header::cleanhtml($2,"y");
>  			}
>  			if ($_ =~ m/Classification: (.*)\] \[Priority:
> (\d)\]/) {
  
Peter Müller Nov. 21, 2017, 5:13 a.m. UTC | #2
Hello Michael,

Emerging Threats changed some snort signature IDs to 5 digits
a while, which were not displayed in the WebUI since "([0-9]{1,4})"
did not match on it.

This patch adjusts the regular expression so they are displayed
correctly now.

Should I send in a second version with this description? Thought
the bug ID would be enough...

Best regards, 
Peter Müller

> Hello,
> 
> can you explain what this patch is supposed to change?
> 
> -Michael
> 
> On Sun, 2017-11-19 at 18:04 +0100, Peter Müller wrote:
> > Fixes #11519.
> > 
> > Signed-off-by: Peter Müller <peter.mueller@link38.eu>
> > ---
> >  html/cgi-bin/logs.cgi/ids.dat | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/html/cgi-bin/logs.cgi/ids.dat b/html/cgi-bin/logs.cgi/ids.dat
> > index 44b3abdac..98176d690 100644
> > --- a/html/cgi-bin/logs.cgi/ids.dat
> > +++ b/html/cgi-bin/logs.cgi/ids.dat
> > @@ -387,7 +387,7 @@ sub processevent
> >  				}
> >  				($title,$classification,$priority,$date,$time
> > ,$srcip,$srcport,$destip,$destport, $sid) =
> > ("n/a","n/a","n/a","n/a","n/a","n/a","n/a","n/a","n/a", "n/a");
> >  				@refs = ();
> > -				$_ =~ m/:([0-9]{1,4})\] (.*) \[\*\*\]/;
> > +				$_ =~ m/:([0-9]{1,5})\] (.*) \[\*\*\]/;
> >  				$title = &Header::cleanhtml($2,"y");
> >  			}
> >  			if ($_ =~ m/Classification: (.*)\] \[Priority:
> > (\d)\]/) {
  
Michael Tremer Nov. 21, 2017, 11:06 p.m. UTC | #3
Hi,

the bug ID is good, but it didn't have a precise explanation either.

I just wanted this on the record so that we know what this patch was supposed to
be doing.

Yes, please send again.

Best,
-Michael

On Mon, 2017-11-20 at 19:13 +0100, Peter Müller wrote:
> Hello Michael,
> 
> Emerging Threats changed some snort signature IDs to 5 digits
> a while, which were not displayed in the WebUI since "([0-9]{1,4})"
> did not match on it.
> 
> This patch adjusts the regular expression so they are displayed
> correctly now.
> 
> Should I send in a second version with this description? Thought
> the bug ID would be enough...
> 
> Best regards, 
> Peter Müller
> 
> > Hello,
> > 
> > can you explain what this patch is supposed to change?
> > 
> > -Michael
> > 
> > On Sun, 2017-11-19 at 18:04 +0100, Peter Müller wrote:
> > > Fixes #11519.
> > > 
> > > Signed-off-by: Peter Müller <peter.mueller@link38.eu>
> > > ---
> > >  html/cgi-bin/logs.cgi/ids.dat | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/html/cgi-bin/logs.cgi/ids.dat b/html/cgi-bin/logs.cgi/ids.dat
> > > index 44b3abdac..98176d690 100644
> > > --- a/html/cgi-bin/logs.cgi/ids.dat
> > > +++ b/html/cgi-bin/logs.cgi/ids.dat
> > > @@ -387,7 +387,7 @@ sub processevent
> > >  				}
> > >  				($title,$classification,$priority,$date,$
> > > time
> > > ,$srcip,$srcport,$destip,$destport, $sid) =
> > > ("n/a","n/a","n/a","n/a","n/a","n/a","n/a","n/a","n/a", "n/a");
> > >  				@refs = ();
> > > -				$_ =~ m/:([0-9]{1,4})\] (.*) \[\*\*\]/;
> > > +				$_ =~ m/:([0-9]{1,5})\] (.*) \[\*\*\]/;
> > >  				$title = &Header::cleanhtml($2,"y");
> > >  			}
> > >  			if ($_ =~ m/Classification: (.*)\] \[Priority:
> > > (\d)\]/) {  
> 
>
  

Patch

diff --git a/html/cgi-bin/logs.cgi/ids.dat b/html/cgi-bin/logs.cgi/ids.dat
index 44b3abdac..98176d690 100644
--- a/html/cgi-bin/logs.cgi/ids.dat
+++ b/html/cgi-bin/logs.cgi/ids.dat
@@ -387,7 +387,7 @@  sub processevent
 				}
 				($title,$classification,$priority,$date,$time,$srcip,$srcport,$destip,$destport, $sid) = ("n/a","n/a","n/a","n/a","n/a","n/a","n/a","n/a","n/a", "n/a");
 				@refs = ();
-				$_ =~ m/:([0-9]{1,4})\] (.*) \[\*\*\]/;
+				$_ =~ m/:([0-9]{1,5})\] (.*) \[\*\*\]/;
 				$title = &Header::cleanhtml($2,"y");
 			}
 			if ($_ =~ m/Classification: (.*)\] \[Priority: (\d)\]/) {