diff options
| author | Frederic Peters <fpeters@entrouvert.com> | 2005-01-13 14:11:17 +0000 |
|---|---|---|
| committer | Frederic Peters <fpeters@entrouvert.com> | 2005-01-13 14:11:17 +0000 |
| commit | 37c1a3e8b0a183fd1744e625c9a6ed70cc802cca (patch) | |
| tree | fc58ffd68a51961fefa8638df8246195484b61b4 /php | |
| parent | cd8a5088f2a9e22aade9d93c0085d57507c300a3 (diff) | |
| download | lasso-37c1a3e8b0a183fd1744e625c9a6ed70cc802cca.tar.gz lasso-37c1a3e8b0a183fd1744e625c9a6ed70cc802cca.tar.xz lasso-37c1a3e8b0a183fd1744e625c9a6ed70cc802cca.zip | |
safe against unfound strings
Diffstat (limited to 'php')
| -rwxr-xr-x | php/patch_swig_output.py | 3 | ||||
| -rwxr-xr-x | php/tests/perfs.php | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/php/patch_swig_output.py b/php/patch_swig_output.py index 6e886aa2..4ae5fcd8 100755 --- a/php/patch_swig_output.py +++ b/php/patch_swig_output.py @@ -138,11 +138,14 @@ end = """ i = wrap.find(begin) while i >= 0: j = wrap.find(end, i) + len(end) + if j < len(end): # bails out if not found + break segment = wrap[i:j] x = segment.find('object_init_ex(obj,') + len('object_init_ex(obj,') y = segment.find(')', x) segment = '%s%s%s' % (segment[:x], 'get_node_info_with_swig(ty)->php', segment[y:]) wrap = '%s%s%s' % (wrap[:i], segment, wrap[j:]) i = wrap.find(begin, i + len(segment)) + print i, j print wrap diff --git a/php/tests/perfs.php b/php/tests/perfs.php index 6a4b2a49..61675135 100755 --- a/php/tests/perfs.php +++ b/php/tests/perfs.php @@ -57,9 +57,11 @@ for ($i=0; $i < 50; $i++) { $request->NameIDPolicy = LASSO_LIB_NAMEID_POLICY_TYPE_FEDERATED; $request->ProtocolProfile = LASSO_LIB_PROTOCOL_PROFILE_BRWS_POST; $login->buildAuthnRequestMsg(); + printf("%s\n", $login->msgUrl); } $query = $login->msgUrl; +print $query; $authn_response_msg = create_authnresponse($query); printf("Processing 50 AuthnResponse...\n"); |
