From d5c9c4e61f5075e139513af7e96e0990faa0935d Mon Sep 17 00:00:00 2001 From: Simon Pichugin Date: Jul 24 2020 13:30:53 +0000 Subject: Issue 51086 - Fix instance name length for interactive install Description: Instance name lenght is not properly validated during interactive install. Add a check during a user input. https://pagure.io/389-ds-base/issue/51086 Reviewed by: mreynolds (Thanks!) --- diff --git a/src/lib389/lib389/instance/setup.py b/src/lib389/lib389/instance/setup.py index 418b71b..d117292 100644 --- a/src/lib389/lib389/instance/setup.py +++ b/src/lib389/lib389/instance/setup.py @@ -309,6 +309,9 @@ class SetupDs(object): val = input('\nEnter the instance name [{}]: '.format(slapd['instance_name'])).rstrip() if val != "": + if len(val) > 80: + print("Server identifier should not be longer than 80 symbols") + continue if not all(ord(c) < 128 for c in val): print("Server identifier can not contain non ascii characters") continue