I’ve configured hotspot with internal landing page so user authenthicate by pap
when I’m trying to login i’ve got js error:
ChilliMD5.js:44 Uncaught TypeError: Cannot read properties of null (reading ‘length’)
at ChilliMD5.fromHex (ChilliMD5.js:44:27)
at ChilliMD5.pap (ChilliMD5.js:52:22)
at form.onsubmit (HotspotLogin.js:100:26)
I guess it because challenge input field is empty.
how can I fix this?
code for landing page form:
<div class="form-container">
<form id="login-form" action="/cgi-bin/hotspot/userpass/login" class="form">
<input type="hidden" name="challenge" value="<%=challenge%>">
<input type="hidden" name="uamip" value="<%=uamip%>">
<input type="hidden" name="uamport" value="<%=uamport%>">
<input type="hidden" name="userurl" value="<%=userurl%>">
<input type="hidden" name="challenge" value="<%=challenge%>">
<div class="form-item">
<label for="" class="form-label"><%:Name%>*</label>
<input name="username" type="text" class="form-input" placeholder="<%:Username%><%=signup and '/Email'%>" required>
</div>
<div class="form-item">
<label for="" class="form-label"><%:Password%>*</label>
<input name="password" type="password" class="form-input" placeholder="<%:Password%>" required>
</div>
<%- if tos then -%>
<div class="checkbox-container">
<input class="dialog-input" name="agreetos" id="agreetos" type="checkbox" value="1" required>
<%:I agree to the %><a target="_blank" href="tos"><%:Terms of Service%></a>
</div>
<%- end -%>
<%- if trial then -%>
<div class="checkbox-container mleft"><a id="trial_link" href="#"><%=translatef("Click here %s for trial access", "</a>")%></div>
<%- end -%>
<button class="form-btn" type="submit"><%:Log In%></button>
</form>
</div>