Forum Discussion
Jeff_Green_4244
Nov 07, 2011Nimbostratus
Create Domino LTPA token on F5 problem
Hi,
I'm trying to use the code at
http://per.lausten.dk/blog/2009/06/how-to-create-a-ltpa-session-cookie-for-lotus-domino-using-f5.html
to create a Domino LTPA token but...
Kurt_Knochner_5
Nov 09, 2011Cirrus
Hi,
the append function in the original iRule might cause the problem.
Nov 9 03:49:44 local/tmm info tmm[5158]: Rule irule03 : WITHOUT append
Nov 9 03:49:44 local/tmm info tmm[5158]: Rule irule03 : Text: 0001020348656c6c6f20576f726c64
Nov 9 03:49:44 local/tmm info tmm[5158]: Rule irule03 : Text encoded: 414145434130686c6247787649466476636d786b
Nov 9 03:49:44 local/tmm info tmm[5158]: Rule irule03 : Text decoded: 0001020348656c6c6f20576f726c64
Nov 9 03:49:57 local/tmm info tmm[5158]: Rule irule03 : WITH append
Nov 9 03:49:57 local/tmm info tmm[5158]: Rule irule03 : Text: 0001020348656c6c6f20576f726c64
Nov 9 03:49:57 local/tmm info tmm[5158]: Rule irule03 : Text encoded: 7749414241674e495a5778736279425862334a735a413d3d
Nov 9 03:49:57 local/tmm info tmm[5158]: Rule irule03 : Text decoded: c08001020348656c6c6f20576f726c64
[root@lb01:Active] log b rule irule03 list
rule irule03 {
when RULE_INIT {
log local0. "WITHOUT append"
set text "\x00\x01\x02\x03Hello World"
log local0. "WITH append"
set hello "\x00\x01\x02\x03Hello World"
set text {}
append text $hello
set text_enc [b64encode $text]
set text_dec [b64decode $text_enc]
binary scan $text H* text_hex
binary scan $text_enc H* text_enc_hex
binary scan $text_dec H* text_dec_hex
log local0. "Text: $text_hex"
log local0. "Text encoded: $text_enc_hex"
log local0. "Text decoded: $text_dec_hex"
}
}
Is this a bug?
EDIT: Something is wrong with the string when it is initialized as an empty string with 'set text {}'. Anyway, if I change the init to -- set text '' --, the output looks like this, and it's still wrong (c080 in the string).
Nov 9 03:54:20 local/tmm info tmm[5158]: Rule irule03 : WITH append
Nov 9 03:54:20 local/tmm info tmm[5158]: Rule irule03 : Text: 27270001020348656c6c6f20576f726c64
Nov 9 03:54:20 local/tmm info tmm[5158]: Rule irule03 : Text encoded: 4a796641674145434130686c6247787649466476636d786b
Nov 9 03:54:20 local/tmm info tmm[5158]: Rule irule03 : Text decoded: 2727c08001020348656c6c6f20576f726c64
So, it's only a problem, if the string is initialized as an empty string and if one uses 'append' to add other strings to it. I'm not sure if this is O.K.
EDIT2: Furthermore, the problem only exists, if the appended string starts with \x00.
Nov 9 04:20:36 local/tmm info tmm[5158]: Rule irule03 : WITH append
Nov 9 04:20:36 local/tmm info tmm[5158]: Rule irule03 : Text: 01020348656c6c6f20576f726c64
Nov 9 04:20:36 local/tmm info tmm[5158]: Rule irule03 : Text encoded: 415149445347567362473867563239796247513d
Nov 9 04:20:36 local/tmm info tmm[5158]: Rule irule03 : Text decoded: 01020348656c6c6f20576f726c64
To sum it up.
1.) create a string that starts with \x00
2.) initialize another string with "set string2 {}"
3.) append the first string to the second string. 'append string2 $string1'
4.) b64encode and then b64decode string2 and the result will contain (or start with) c080.
This really looks like a bug.
Regards
Kurt Knochner
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects