Technical Forum
Ask questions. Discover Answers.
cancel
Showing results for 
Search instead for 
Did you mean: 

google 2fa irule error

Abed_AL-R
Cirrostratus
Cirrostratus

I'm struggling with this error when doing "load sys config verify

 

[use curly braces to avoid double substitution]

 

full error message

 

/Common/Google_Token:131: warning: [use curly braces to avoid double substitution][(0x{[string range ${token} ${offset} [expr {${offset} + 7}]]}]

 

The irule line in original code was

 

set ga_code [expr (0x[string range $token $offset [expr $offset + 7]] & 0x7FFFFFFF) % 1000000]

 

And I changed it to

 

set ga_code [expr (0x[string range ${token} ${offset} [expr {${offset} + 7}]] & 0x7FFFFFFF) % 1000000]

 

I'm able to connect to APM and passing the token , it is working fine there, but this cannot get rid of this error message

Any one can help with the correct syntax ?

article https://support.f5.com/csp/article/K57410758 seems not to be very helpful

2 REPLIES 2

Stefan_Klotz
Cumulonimbus
Cumulonimbus

Dear Abed,

checking the F5 knowledgebase article, I would interpret the correct syntax as follows:

set ga_code [expr {0x[string range $token $offset [expr {$offset + 7}]] & 0x7FFFFFFF} % 1000000]

But I don't have tested it right now, so please give it a try.

Thank you!

Regards,

Stefan 🙂

I actually tried this

The F5 accept the irule

and the error disappears

but the APM connection is not working anymore

when I try to connect , I pass the username / password , then I type the OTP , and when I click 'next' the APM resets the connection and start over from the beginning

so it stop resuming to establishing the connection