Just checking after is the easy solution.
The other options are:
A) Custom plug-in that uses SHLimitInputEdit.
B) Custom plug-in that subclasses and filters WM_CHAR and handles WM_PASTE.
C) WndSubClass plug-in
!include nsDialogs.nsh
!include WndSubclass.nsh
var TextFieldSubProc
Function CustomPage
nsDialogs::Create 1018
Pop $0
${NSD_CreateText} 0 0 100% 12u "" "Password"
Pop $9
${WndSubclass_Subclass} $9 TextFieldSubProc $TextFieldSubProc $TextFieldSubProc
nsDialogs::Show
FunctionEnd
Function TextFieldSubProc
${If} $2 = ${WM_CHAR}
${If} $3 > 127
${WndSubClass_Ret} 0
${EndIf}
${EndIf}
${If} $2 = ${WM_PASTE}
${WndSubClass_Ret} 0 ; Disable paste because it is hard to filter.
${EndIf}
FunctionEnd
Page Custom CustomPage
Page InstFiles