Posted in : NetScaler Av Simon Gottschlag Översätt med Google ⟶
7 years ago
Update:
Seems like the first method actually removes a password field when changing password. This shouldn’t do that:
add rewrite action RWA-RES-REMOVE_2ND_PASSWORD replace_all "HTTP.RES.BODY(99999)" "\"\\r\\n\"+\n\"<style type=\\\"text/css\\\">\\r\\n\"+\n\"[for=\\\"passwd1\\\"] { display: none;}\\r\\n\"+\n\"#passwd1 { display: none; }\\r\\n\"+\n\"</style>\\r\\n\"+\n\"\\r\\n\"+\n\"</body>\\r\\n\"+\n\"</html>\\r\\n\"" -search "text(\"</body>\n</html>\")" add rewrite policy RWP-RES-REMOVE_2ND_PASSWORD "HTTP.REQ.URL.PATH_AND_QUERY.SET_TEXT_MODE(IGNORECASE).EQ(\"/logon/LogonPoint/index.html\")" RWA-RES-REMOVE_2ND_PASSWORD bind vpn vserver <NSGW VSERVER> -policy RWP-RES-REMOVE_2ND_PASSWORD -priority 80 -gotoPriorityExpression NEXT -type RESPONSE
Original post:
Have you had an issue with RfWebUI where you need to remove the ”Password 2”-field when for example using RADIUS as primary authentication source (challenge based) and LDAP as secondary?
As always, the great Sam Jacobs has the answer on Citrix Discussions.
If you don’t want to edit any files yourself or not create a a new theme you can use a rewrite to do this for you: (I’m editing style.css and not theme.css)
add rewrite action RWA-RES-REMOVE_2ND_PASSWORD insert_after "HTTP.RES.BODY(9999)" "\"\\r\\n\"+\"div.field:nth-child(4) {\\r\\n\"+\n\" display:none;\\r\\n\"+\n\"}\\r\\n\"" add rewrite policy RWP-RES-REMOVE_2ND_PASSWORD "HTTP.REQ.URL.PATH_AND_QUERY.SET_TEXT_MODE(IGNORECASE).EQ(\"/logon/LogonPoint/custom/style.css\")" RWA-RES-REMOVE_2ND_PASSWORD bind vpn vserver <vServer> -policy RWP-RES-REMOVE_2ND_PASSWORD -priority 100 -gotoPriorityExpression END -type RESPONSE
It should now look as expected:
Tags : NetScaler, NetScaler Gateway, rewrite, RfWebUI
Personlig rådgivning
Vi erbjuder personlig rådgivning med författaren för 1400 SEK per timme. Anmäl ditt intresse i här så återkommer vi så snart vi kan.
Comments
Christian says
Hi Simon,
first of all thanks 'cause your site is a great mine of useful information.
I also was searching how to remove the field and found the answer on https://www.mycugc.org/p/fo/st/thread=2228.
Can i ask if you could give another tip on how to auto fill out the password2 with a text word ?
Regards
Christian
Simon Gottschlag says
Hi Christian,
Thanks!
I haven't done anything when it comes to autofilling password2, but I've may have something similar where we pre-fill the username based: https://xenit.se/techblogg/prepopulate-username-netscalers-rfwebui/
Add comment