Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect Access Restrictions #291

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion MerlinAU.sh
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,7 @@ readonly PRODUCT_ID="$(_GetRouterProductID_)"

##FOR TESTING/DEBUG ONLY##
##readonly PRODUCT_ID="TUF-AX3000_V2"
##readonly MODEL_ID="$PRODUCT_ID"
##FOR TESTING/DEBUG ONLY##

readonly FW_FileName="${PRODUCT_ID}_firmware"
Expand Down Expand Up @@ -1938,7 +1939,7 @@ _GetCurrentFWInstalledLongVersion_()
{

##FOR TESTING/DEBUG ONLY##
if false ; then echo "3004.388.6.2" ; return 0 ; fi
if true ; then echo "3004.388.6.2" ; return 0 ; fi
##FOR TESTING/DEBUG ONLY##

local theVersionStr extVersNum
Expand Down Expand Up @@ -2585,6 +2586,16 @@ _GetLoginCredentials_()
local oldPWSDstring thePWSDstring
local loginCredsENC loginCredsDEC

# Check if Access Restrictions are enabled #
local accRestriction
accRestriction="$(nvram get enable_acc_restriction)"
if [ "$accRestriction" = "1" ]; then
printf "${REDct}WARNING: Access Restrictions are enabled!${NOct}\n"
printf "${REDct}Please disable 'Enable Access Restrictions' from 'Administration - System' for MerlinAU to login to the WebUI.${NOct}\n"
_WaitForEnterKey_
return 1
fi

# Get the Username from NVRAM #
userName="$(nvram get http_username)"

Expand Down Expand Up @@ -5936,6 +5947,10 @@ Please manually update to version $MinSupportedFirmwareVers or higher to use thi
# Send last email notification before F/W flash #
_SendEMailNotification_ START_FW_UPDATE_STATUS

_ReleaseLock_
_DoExit_ 1
exit 1

##------------------------------------------##
## Modified by ExtremeFiretop [2024-Jun-30] ##
##------------------------------------------##
Expand Down