Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-4682

Pterodactyl: Allow port in module row hostname field

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.6.0-b1
    • Component/s: None
    • Labels:
      None

      Description

      See https://github.com/blesta/module-pterodactyl/issues/66

      In components/modules/pterodactyl/pterodactyl.php around line 408 change

                  'host_name' => [
                      'valid' => [
                          'rule' => function ($host_name) {
                              $validator = new Server();
                              $parts = explode(':', $host_name);
                              return $validator->isDomain($parts[0]) || $validator->isIp($parts[0]);
                          },
                          'message' => Language::_('Pterodactyl.!error.host_name.valid', true)
                      ]
                  ],
      

      To

                  'host_name' => [
                      'valid' => [
                          'rule' => function ($host_name) {
                              $validator = new Server();
                              $parts = explode(':', $host_name);
                              return ($validator->isDomain($parts[0]) || $validator->isIp($parts[0]))
                                  && (!isset($parts[1]) || is_numeric($parts[1]));
                          },
                          'message' => Language::_('Pterodactyl.!error.host_name.valid', true)
                      ]
                  ],
      

        Activity

        jonathan Jonathan Reissmueller created issue -
        jonathan Jonathan Reissmueller made changes -
        Field Original Value New Value
        Rank Ranked higher
        jonathan Jonathan Reissmueller made changes -
        Rank Ranked higher
        jonathan Jonathan Reissmueller made changes -
        Story Points 1
        jonathan Jonathan Reissmueller made changes -
        Description In components/modules/pterodactyl/pterodactyl.php around line 408 change

        {code:java}
                    'host_name' => [
                        'valid' => [
                            'rule' => function ($host_name) {
                                $validator = new Server();
                                $parts = explode(':', $host_name);
                                return $validator->isDomain($parts[0]) || $validator->isIp($parts[0]);
                            },
                            'message' => Language::_('Pterodactyl.!error.host_name.valid', true)
                        ]
                    ],
        {code}

        To

        {code:java}
                    'host_name' => [
                        'valid' => [
                            'rule' => function ($host_name) {
                                $validator = new Server();
                                $parts = explode(':', $host_name);
                                return ($validator->isDomain($parts[0]) || $validator->isIp($parts[0]))
                                    && is_numeric($parts[1]);
                            },
                            'message' => Language::_('Pterodactyl.!error.host_name.valid', true)
                        ]
                    ],
        {code}
        See https://github.com/blesta/module-pterodactyl/issues/66

        In components/modules/pterodactyl/pterodactyl.php around line 408 change

        {code:java}
                    'host_name' => [
                        'valid' => [
                            'rule' => function ($host_name) {
                                $validator = new Server();
                                $parts = explode(':', $host_name);
                                return $validator->isDomain($parts[0]) || $validator->isIp($parts[0]);
                            },
                            'message' => Language::_('Pterodactyl.!error.host_name.valid', true)
                        ]
                    ],
        {code}

        To

        {code:java}
                    'host_name' => [
                        'valid' => [
                            'rule' => function ($host_name) {
                                $validator = new Server();
                                $parts = explode(':', $host_name);
                                return ($validator->isDomain($parts[0]) || $validator->isIp($parts[0]))
                                    && is_numeric($parts[1]);
                            },
                            'message' => Language::_('Pterodactyl.!error.host_name.valid', true)
                        ]
                    ],
        {code}
        jonathan Jonathan Reissmueller made changes -
        Security Private [ 10000 ]
        jonathan Jonathan Reissmueller made changes -
        Description See https://github.com/blesta/module-pterodactyl/issues/66

        In components/modules/pterodactyl/pterodactyl.php around line 408 change

        {code:java}
                    'host_name' => [
                        'valid' => [
                            'rule' => function ($host_name) {
                                $validator = new Server();
                                $parts = explode(':', $host_name);
                                return $validator->isDomain($parts[0]) || $validator->isIp($parts[0]);
                            },
                            'message' => Language::_('Pterodactyl.!error.host_name.valid', true)
                        ]
                    ],
        {code}

        To

        {code:java}
                    'host_name' => [
                        'valid' => [
                            'rule' => function ($host_name) {
                                $validator = new Server();
                                $parts = explode(':', $host_name);
                                return ($validator->isDomain($parts[0]) || $validator->isIp($parts[0]))
                                    && is_numeric($parts[1]);
                            },
                            'message' => Language::_('Pterodactyl.!error.host_name.valid', true)
                        ]
                    ],
        {code}
        See https://github.com/blesta/module-pterodactyl/issues/66

        In components/modules/pterodactyl/pterodactyl.php around line 408 change

        {code:java}
                    'host_name' => [
                        'valid' => [
                            'rule' => function ($host_name) {
                                $validator = new Server();
                                $parts = explode(':', $host_name);
                                return $validator->isDomain($parts[0]) || $validator->isIp($parts[0]);
                            },
                            'message' => Language::_('Pterodactyl.!error.host_name.valid', true)
                        ]
                    ],
        {code}

        To

        {code:java}
                    'host_name' => [
                        'valid' => [
                            'rule' => function ($host_name) {
                                $validator = new Server();
                                $parts = explode(':', $host_name);
                                return ($validator->isDomain($parts[0]) || $validator->isIp($parts[0]))
                                    && (!isset($parts[1]) || is_numeric($parts[1]));
                            },
                            'message' => Language::_('Pterodactyl.!error.host_name.valid', true)
                        ]
                    ],
        {code}
        jonathan Jonathan Reissmueller made changes -
        Security Private [ 10000 ]
        jonathan Jonathan Reissmueller made changes -
        Sprint 5.6.0 Sprint 1 [ 156 ]
        jonathan Jonathan Reissmueller made changes -
        Sprint 5.6.0 Sprint 1 [ 156 ] 5.6.0/5.5.1 [ 166 ]
        jonathan Jonathan Reissmueller made changes -
        Rank Ranked lower
        abdy Abdy Franco made changes -
        Assignee Abdy Franco [ abdy ]
        abdy Abdy Franco made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        abdy Abdy Franco made changes -
        Status In Progress [ 3 ] In Review [ 5 ]
        Resolution Fixed [ 1 ]
        abdy Abdy Franco made changes -
        Remaining Estimate 0 minutes [ 0 ]
        Time Spent 13 minutes [ 780 ]
        Worklog Id 15937 [ 15937 ]
        jonathan Jonathan Reissmueller made changes -
        Sprint 5.6.0 Sprint 1/5.5.1 [ 166 ] 5.6.0 Sprint 1/5.5.1, 5.6.0 Sprint 2 [ 166, 167 ]
        jonathan Jonathan Reissmueller made changes -
        Rank Ranked higher
        jonathan Jonathan Reissmueller made changes -
        Status In Review [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            abdy Abdy Franco
            Reporter:
            jonathan Jonathan Reissmueller
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              15/Nov/22

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 13 minutes
              13m

                Agile