Start a new topic
Implemented

Feature Request: Remove leading and trailing '|' from hostnames in Blackout ...

Hi,



 

today we had a ‘nice’ outage due to blackout since someone was trying to do regular expressions.


Luckily your MRL leaves the data ID of the blackout entry that caused the event to be blackout out


in mc_operations slot so I was able to quite quickly identify the ‘bad’ blackout entry.



 

Basically the guy added leading and trailing ‘|’ which caused regexp to basically match everything!



 

Instead of writing a regular expression which is supposed to validate the data entered by the user,


I guess it would be easier to let ProactivePack test for this use-case …



 

Maintenance_Periodes_Dates;


     IsaCalendar=NO;


     ApplyToNonClosedEvents=NO;


     Action=CLOS;


     Proprietaire=AYGOV;


     Group=Guests;


     Commentaire=TAS000000668778;


     MaintStart=1528426500;


     MaintStop=1528455600;


     Host='|USAp-stlo410-01.*|USAw-stlo410-ANC-A1|';


     Maintenance_application_class='.*';


     Maintenance_instance='.*';


     Maintenance_parameter='.*';


END



 

Leading and/or trailing ‘|’ also when combined with parentheses ‘(|’ / ‘|)’ will cause the regex to basically match any host!


This is super scary! But doing a regex to validate another regex is not that fun … so maybe you want to pick it up to handle


that scenario.



 

Some kind of (pseudocode) …



 

if host startswith('|') or host startswith('(|') or host endswith('|') or host endswith('|)') then throw an exception



 

Blackout is heavily used at IKEA and my team won’t be able to take care of all blackout requests. Thus blackout is open for everyone.


I won’t be able to teach everyone regular expressions ;-) Also disallowing regular expression at all won’t be an option as well since


people also upload hosts from a files (which will be handled as a regular expression as well).



 

Best regards


Thomas



 

Thomas Hille


Technical Analyst


IKEA IT Germany GmbH


Tel: +49 231 9678 3222


Fax: +49 231 9678 3199






 

IKEA IT Germany GmbH


Niederlassung/Office Dortmund


Ellinghauser Straße 213


44359 Dortmund


 

Sitz München HR B 79392, Amtsgericht München


Geschäftsführer: Jürgen Schöpper, Göran Sjöstrand



 


(656 Bytes)
Login or Signup to post a comment