<h3>Description</h3>
<p>If var is encoded with <code>base58</code>, it can't be restored via <code>s.decode.base58</code></p>
<h4>Reproduction</h4>
<pre><code>request_route {
route(TEST_BASE58);
}
route[TEST_BASE58] {
$var(test_var) = "This is a text";
$var(test_var_encode_base58) = $(var(test_var){s.encode.base58});
$var(test_var_decode_base58) = $(var(test_var_encode_base58){s.decode.base58});
xlog("L_ALERT", "[BASE58 TEST] $var(test_var) -> $var(test_var_encode_base58) -> $var(test_var_decode_base58) \n");
}
</code></pre>
<h4>Log Messages</h4>
<p>2 messages just to show, that var is not restored</p>
<pre><code>44(60) ALERT: <script>: [BASE58 TEST] This is a text -> Y2oxCuAXwVJduYPTnFd -> 14(30) ALERT: <script>: [BASE58 TEST] This is a text -> Y2oxCuAXwVJduYPTnFd ->
</code></pre>
<h3>Additional Information</h3>
<ul>
<li><strong>Kamailio Version</strong> - output of <code>kamailio -v</code></li>
</ul>
<pre><code>version: kamailio 5.2.0 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144 MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 5.3.1
</code></pre>
<ul>
<li><strong>Operating System</strong>:</li>
</ul>
<pre><code>4.4.0-135-generic #161-Ubuntu SMP Mon Aug 27 10:45:01 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
</code></pre>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/1868">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZVNFU0QYIBmE6SfSJlhuKqn0nslhks5vRQpUgaJpZM4bR09t">mute the thread</a>.<img src="https://github.com/notifications/beacon/AF36ZUQuzmb4sHsXytMRByWdG-neba8oks5vRQpUgaJpZM4bR09t.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"Base58 decode not working (#1868)"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/1868"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/1868",
"url": "https://github.com/kamailio/kamailio/issues/1868",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>