Firmware: 4.9.0, GL-MT6000 (Flint 2)
Symptom: "Unknown error occurred" on web login. SSH works fine.
logread shows: gl-ngx-session:296: bad argument #2 to 'format' (number expected, got nil)
Root cause: in /usr/sbin/gl-ngx-session, get_nginx_port() uses: local port = conf:match('listen (%d+);') This pattern only matches "listen ;" and returns nil when /etc/nginx/conf.d/gl.conf contains "listen :;" (e.g. "listen 192.168.8.1:80;"). The nil then crashes the string.format('...%d...', port) at line 296, before password validation.
Workaround: edit gl.conf to "listen 80;" / "listen 443 ssl;" (loses interface binding) and restart nginx.
Suggested fix: make the regex capture the port in both formats, e.g. conf:match('listen [%d.:%[%]]*:?(%d+)') so it works whether or not an IP/interface prefix is present.