Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Using the POST values….

    Scheduled Pinned Locked Moved Captive Portal
    2 Posts 1 Posters 2.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      Aqid
      last edited by

      I got a little question. I am using the Captive portal, the first HTML page redirects to a PHP login page with the following form (code-snippet):

      
      <form method="post" action="$PORTAL_ACTION$">
         			User:	
      
         			Pass:
      
         		&id=">
      
      			</form>
      
      

      After this login page, I want it to redirect to the page: captiveportal-map_drive.php with the following 2 values: redirect URL and Username (in some form of encyption). Obviously its not working this way, since the var $_POST["auth_user"] hasnt gotten any value at this point. What would be the correct way of using the POST value of "auth_users"? I have no idea since I'm not sure of what $PORTAL_ACTION$ does with the POST values.

      1 Reply Last reply Reply Quote 0
      • A
        Aqid
        last edited by

        Nevermind, I found it out by myself. For those who are intrested in the solution:
        Log in to pfSense and go to Diagnostics -> Edit File.

        Edit the following file: /usr/local/captiveportal/index.php

        To use one of the POST value's you can alter the var called $my_redirecturl. Since I dont want to send the username in plain text I've put md5 encryption around it.

        Snippet:

        
        $my_redirurl .= "&id=" . md5($_POST['auth_user']);
        
        
        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.