CyberPanel Community

Blacklisted domain - but the domain does not contains hostname or any blacklisted domain

AX
Aldo X #1

Hello!
Im getting an error after updating to the latest commit.
The domain that im trying to create does not contains hostname or any other blacklisted domains.
I also tried to change the hostname or delete the socket.gethostname() from acl.py file but the problem isnt fixed.

When i change the server hostname im getting another error on Version Management

Current Commit: sudo: unable to resolve host “newhostname”: Name or service not known 9de252a75e62017702bd399f5014d306a1c8c7a0

I restarted server several times and i tried to relaunch an update, again the problem still exists.
Anyone to help me please?

CyberPanel is running on: Ubuntu 20.04
Current Version: 2.3
Build: 4
Current Commit: 9de252a75e62017702bd399f5014d306a1c8c7a0
Latest Version: 2.3
Latest Build: 4
Latest Commit: 9de252a75e62017702bd399f5014d306a1c8c7a0

12 replies
AX
Aldo X #3

Thank you for your reply!
I have explained the topic well and i have tried the method that is explained there but the problem still exist.
Do you have a more honest answer to this problem?

jo
josephgodwinke #4

Try and run systemctl restart lscpd

jo
josephgodwinke #5

Also it would be best if you tried to change your hostname using vnc or ssh for the moment and see if the issue disappears

jo
josephgodwinke #7

Which domain are you using to create a website ? Because all those you are throwing at your server are not domains

AX
Aldo X #8

Here is the domain that im trying to create a website, but i have tried also another domains , subdomains and the problem is for every domain that im trying.

AX
Aldo X #11

@josephgodwinke do you have any idea for a possible solution?
This is a bug that must have attention.

jo
josephgodwinke #12

Tried to replicate your issue on a new server and could not run into the same issue. Can you reprovision your VM or server and try again

AX
Aldo X #13

I fixed this by changing all return 0 to return 1 on acl.py

i only changed this part of acl.py

    @staticmethod
    def checkOwnerProtection(currentACL, owner, child):
        if currentACL['admin'] == 1:
            return 1
        elif child.owner == owner.pk:
            return 1
        elif child == owner:
            return 1
        else:
            return 1

    @staticmethod
    def CheckDomainBlackList(domain):
        import socket

        BlackList = [ socket.gethostname(), 'hotmail.com', 'gmail.com', 'yandex.com', 'yahoo.com', 'localhost', 'aol.com', 'apple.com',
                     'cloudlinux.com', 'email.com', 'facebook.com', 'gmx.de', 'gmx.com', 'google.com',
                     'hushmail.com', 'icloud.com', 'inbox.com', 'imunify360.com', 'juno.com', 'live.com', 'localhost.localdomain',
                     'localhost4.localdomain4', 'localhost6.localdomain6','mail.com', 'mail.ru', 'me.com',
                     'microsoft.com', 'mxlogic.net', 'outlook.com', 'protonmail.com', 'twitter.com', 'yandex.ru']

        DotsCounter = domain.count('.')

        for black in BlackList:
            if DotsCounter == 1:
                if domain == black:
                    return 1
            else:
                if domain.endswith(black):
                    logging.writeToFile(black)
                    return 1

        return 1

This was a temporary solution for me, but you can investigate more for this problem, somewhere its a bug.

Sign in to reply