Created
August 11, 2020 13:15
-
-
Save josy1024/aa25372640c8ae5907bd5e85afcec8ce to your computer and use it in GitHub Desktop.
print all ENV variables listet ind perl (OIDC_CLAIM_upn)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# | |
# place in /opt/otrs/bin/cgi-bin/azureadenv.pl | |
# call https://otrs.example.com/otrs/azureadenv.pl | |
# tested in #otrs6 #centos7 | |
# reference: https://gist.github.com/josy1024/84853e1a72f5631f697ee324b93264fe | |
### | |
### printenv -- demo CGI program which just prints its environment | |
### | |
print "Content-type: text/plain; charset=iso-8859-1\n\n"; | |
foreach $var (sort(keys(%ENV))) { | |
$val = $ENV{$var}; | |
$val =~ s|\n|\\n|g; | |
$val =~ s|"|\\"|g; | |
print "${var}=\"${val}\"\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment