#1
  1. A Change of Season
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    3,108
    Rep Power
    220

    Allowing base64_encode items in codeigniter


    Hi;

    I want to be able to allow all base64_encode characters in CodeIgniter URLs. Currently some don;t pass. For example

    YmVuQGJyZWFrdXBwcm9ncmFtLmNvbQ==
    How can I change this in config? I suck at regex

    PHP Code:
    $config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-'
    Thanks
  2. #2
  3. Forgotten Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    16,211
    Rep Power
    9644
    Don't do straight base-64 because it has some characters that aren't safe for URLs.

    Do the URL safe version which uses _ and - (that are already included in the regex).
  4. #3
  5. A Change of Season
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    3,108
    Rep Power
    220
    Originally Posted by requinix
    Don't do straight base-64 because it has some characters that aren't safe for URLs.

    Do the URL safe version which uses _ and - (that are already included in the regex).


    Awesome awesome awesome love your work really xo

    PHP Code:
    redirect(base_url('plc1/'.$this->custom_functions->base64url_encode($_POST['email']))); 

IMN logo majestic logo threadwatch logo seochat tools logo