Maxlength attribute in the passwd field of a GlobalProtect Loginpage

Showing results for 
Show  only  | Search instead for 
Did you mean: 

Maxlength attribute in the passwd field of a GlobalProtect Loginpage

Cyber Elite
Cyber Elite


As Two-Factor Authentication solution we are using yubico yubikeys ( These usb-devices generate a token which is 45 characters long. Unfortunately the global protect loginpage limits the maxlength of the password field to 40 characters. As I found out is that this input limitation is only in the html of the GP loginpage. Because if I remove the maxlength attribute, the login works with the yubikey as second factor.

What I tried as a workaround is the following short script in a custom GP loginpage:

<script type="text/javascript">

function setmaxlength () {

  document.getElementsByName("passwd")[0].maxLength = "50";



This script I loaded with additional onload attribute in the BODY tag.

With this script the maxlength will be set to 50 characters but unfortunately then the login does not work because my short javascript seems to break the PaloAlto Javascript which will be added at the beginning of every custom global protect loginpage and so the password field for the second-factor-passwort will never show up.

Does anyone has an idea how to increase this maxlength attribute in the passwd field for the second-factor-password?




Accepted Solutions


Just tested this and it worked fine (with local authentication). Add this in the <head> section of the page:

We will be using Jquery to remove the attribute:

<script src="//"></script>

<script type="text/javascript">

  $(document).ready(function() {

  $('input[name=passwd]').removeAttr( "maxlength" );



Hope this helps !

View solution in original post


L5 Sessionator


How did you remove the maxlength attribute ? If that works then we can try to remove the attribute using javascript.

Hi bat

In Firefox I have an addon called "Web Developper 1.2.5". There I have the option to change html-forms of websites I opened and for example remote maxlength attributes.

As I wrote I tried something with Javascript, but my skilles there are not very good, so at the moment my 2 lines of script break the default javascript which is required by paloalto.


Could you provide the URL to your global portal page I will try it on my PC

Hi bat

My global protect loginpage is the paloalto default at the moment.

But there you could see the issue

Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!