VirtualBox

Changeset 93791 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Feb 16, 2022 12:49:09 PM (3 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9515. Excluding strings with a dot at the end as hostnames/domainnames.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIHostnameDomainNameEditor.cpp

    r93115 r93791  
    157157    addLineEdit(iRow, m_pDomainNameLabel, m_pDomainNameLineEdit, m_pMainLayout);
    158158
    159     // QRegularExpression hostNameRegex("^[a-zA-Z0-9-.]{2,}\\.[a-zA-Z0-9-.]+$");^[a-zA-Z0-9-.]{2,}\.[a-zA-Z0-9-.]+$
    160     /* Host name and domain should be strings of minimum length of 2 and composed of alpha numerics, '-', and '.': */
    161     m_pHostnameLineEdit->setValidator(new QRegularExpressionValidator(QRegularExpression("^[a-zA-Z0-9-.]{2,}"), this));
    162     m_pDomainNameLineEdit->setValidator(new QRegularExpressionValidator(QRegularExpression("^[a-zA-Z0-9-.]{2,}"), this));
     159    /* Host name and domain should be strings of minimum length of 2 and composed of alpha numerics, '-', and '.'
     160     * Exclude strings with . at the end: */
     161    m_pHostnameLineEdit->setValidator(new QRegularExpressionValidator(QRegularExpression("^[a-zA-Z0-9-.]{2,}[^$.]"), this));
     162    m_pDomainNameLineEdit->setValidator(new QRegularExpressionValidator(QRegularExpression("^[a-zA-Z0-9-.]{2,}[^$.]"), this));
    163163
    164164    connect(m_pHostnameLineEdit, &QILineEdit::textChanged,
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette