16.times { |i| message_json[i] ^= iv[i] }
16.times { |i| message_json[i] = (message_json[i].ord ^ iv[i].ord).chr }
Code works fine, though I did change
sso_token = ([encrypted_bytes].pack('m*'))
to
sso_token = ([encrypted_bytes].pack('m0'))
as otherwise the browser complains about the carriage returns in the resulting value.
<script type="text/javascript">
var _ues = {
host:'feedback.mirthworks.com',
forum:'10578',
lang:'en',
tab_corner_radius:10,
tab_font_size:20,
tab_image_hash:'RmVlZGJhY2s%3D',
tab_alignment:'right',
tab_text_color:'#FFFFFF',
tab_bg_color:'#8CC63F',
tab_hover_color:'#62C462',
params:{sso_token:'P+/gdwI9jKhbAJ5mO+fgJuTIXXoKg+pU/KBzcwVJsBY1fm0oWKCjKuY1VvTNcfipyoiapqd7lj87GzYlpL0+EXoSM2Hl+F6SfFqfKCtAUY02+fMQskX8RMo+vtGJxqTmlVTJ2iWRxvFlkQIYCa9i3OxORmHKZSdcL6Ec7tdGq7xKFWsPsyM9w+FW31YYY5iHXNiUBg9JIGTumoixd0NvfEgSYrNp1tfYB+nYRRjCfrj7L7IidVnK/HEJ3f1Mx6dxtcHczjwXWA1hWOKm+1lHEi/bA5JriM6ThJO5fPfZMMQXPK0gQjuBy76YS8PoZIwZ'}
};
(function() {
var _ue = document.createElement('script'); _ue.type = 'text/javascript'; _ue.async = true;
_ue.src = ('https:' == document.location.protocol ? 'https://s3.amazonaws.com/' : 'http://') + 'cdn.userecho.com/js/widget-1.4.gz.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(_ue, s);
})();
</script>
Note that I also unsuccessfully tested with the key in a straight GET and mucked with the hostname such as 'mirthworks.userecho.com' both to no avail.
Code works fine, though I did change
sso_token = ([encrypted_bytes].pack('m*'))
to
sso_token = ([encrypted_bytes].pack('m0'))
as otherwise the browser complains about the carriage returns in the resulting value.
<script type="text/javascript">
var _ues = {
host:'feedback.mirthworks.com',
forum:'10578',
lang:'en',
tab_corner_radius:10,
tab_font_size:20,
tab_image_hash:'RmVlZGJhY2s%3D',
tab_alignment:'right',
tab_text_color:'#FFFFFF',
tab_bg_color:'#8CC63F',
tab_hover_color:'#62C462',
params:{sso_token:'P+/gdwI9jKhbAJ5mO+fgJuTIXXoKg+pU/KBzcwVJsBY1fm0oWKCjKuY1VvTNcfipyoiapqd7lj87GzYlpL0+EXoSM2Hl+F6SfFqfKCtAUY02+fMQskX8RMo+vtGJxqTmlVTJ2iWRxvFlkQIYCa9i3OxORmHKZSdcL6Ec7tdGq7xKFWsPsyM9w+FW31YYY5iHXNiUBg9JIGTumoixd0NvfEgSYrNp1tfYB+nYRRjCfrj7L7IidVnK/HEJ3f1Mx6dxtcHczjwXWA1hWOKm+1lHEi/bA5JriM6ThJO5fPfZMMQXPK0gQjuBy76YS8PoZIwZ'}
};
(function() {
var _ue = document.createElement('script'); _ue.type = 'text/javascript'; _ue.async = true;
_ue.src = ('https:' == document.location.protocol ? 'https://s3.amazonaws.com/' : 'http://') + 'cdn.userecho.com/js/widget-1.4.gz.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(_ue, s);
})();
</script>
Note that I also unsuccessfully tested with the key in a straight GET and mucked with the hostname such as 'mirthworks.userecho.com' both to no avail.
puts url+"/?sso_token=" + CGI.escape([encrypted_bytes].pack('m0')).gsub('+','%2B')
puts url+"/?sso_token=" + CGI.escape([encrypted_bytes].pack('m0')).gsub('+','%2B')
SSO key in Prod:
params:{sso_token:'RQQJKgwLVzxVAgfOZcDo7tA0hfvgEiDJjSRnqgNUV74QHiTMX4fgDVGJpEfpWxlA1zoKWvXxEh9Mf1lRlUoF%2BJWRRGy55g9JsKaCYCI9Tdm6wE1XFgiT4y0YQrkZQIUUqTfF/xqhG1zde7t/MqFatQwYI9BJ02Jrq/5CZ5RNO19pVsdOHHFNyFDB%2BwAhZidKVkf%2BudN4382BswqhkPSmuvhlZXy642%2BJ/55RZ/yXGqeUKbQ8Qhf/bPfOUcUyvtpjORc9Mmi%2BKxUGJztuhglPiuC1u%2BFykRlD6TtP9isT3Kn4UeRpkJgYWh2o0Y4GSmYI'}};SSO key in stage:
params:{sso_token:'LY39txV1FcypbzOB9385pRTEI%2B2kEfNxK/gdkTszw%2BEIdmPUgPAgC5txRSlx2noiQg1Bw7oIrzJFW39XCQG12gBLwwlvT9%2BIACfjnNPo2/XP6N/rm2hKaEkOGbX5Z%2BfljpoC/VDZLI/uMzTwVBxueW%2BRDu5A9R6fxNJdQWH5wWG9%2BgEBZpQfasrNlsdm3aL16v7xFVBaKrol7JXreOZu9vnDmXfI4tNp7wC5A9BtpNXKq4ZhnI%2BftrNynBmgHfKa0tvsb8Fp0NaEX73EKGhhBm6Qcp2UbTVeZSmn1I3IMOA='}
SSO key in Prod:
params:{sso_token:'RQQJKgwLVzxVAgfOZcDo7tA0hfvgEiDJjSRnqgNUV74QHiTMX4fgDVGJpEfpWxlA1zoKWvXxEh9Mf1lRlUoF%2BJWRRGy55g9JsKaCYCI9Tdm6wE1XFgiT4y0YQrkZQIUUqTfF/xqhG1zde7t/MqFatQwYI9BJ02Jrq/5CZ5RNO19pVsdOHHFNyFDB%2BwAhZidKVkf%2BudN4382BswqhkPSmuvhlZXy642%2BJ/55RZ/yXGqeUKbQ8Qhf/bPfOUcUyvtpjORc9Mmi%2BKxUGJztuhglPiuC1u%2BFykRlD6TtP9isT3Kn4UeRpkJgYWh2o0Y4GSmYI'}};SSO key in stage:
params:{sso_token:'LY39txV1FcypbzOB9385pRTEI%2B2kEfNxK/gdkTszw%2BEIdmPUgPAgC5txRSlx2noiQg1Bw7oIrzJFW39XCQG12gBLwwlvT9%2BIACfjnNPo2/XP6N/rm2hKaEkOGbX5Z%2BfljpoC/VDZLI/uMzTwVBxueW%2BRDu5A9R6fxNJdQWH5wWG9%2BgEBZpQfasrNlsdm3aL16v7xFVBaKrol7JXreOZu9vnDmXfI4tNp7wC5A9BtpNXKq4ZhnI%2BftrNynBmgHfKa0tvsb8Fp0NaEX73EKGhhBm6Qcp2UbTVeZSmn1I3IMOA='}
SSO key in Prod:
params:{sso_token:'RQQJKgwLVzxVAgfOZcDo7tA0hfvgEiDJjSRnqgNUV74QHiTMX4fgDVGJpEfpWxlA1zoKWvXxEh9Mf1lRlUoF%2BJWRRGy55g9JsKaCYCI9Tdm6wE1XFgiT4y0YQrkZQIUUqTfF/xqhG1zde7t/MqFatQwYI9BJ02Jrq/5CZ5RNO19pVsdOHHFNyFDB%2BwAhZidKVkf%2BudN4382BswqhkPSmuvhlZXy642%2BJ/55RZ/yXGqeUKbQ8Qhf/bPfOUcUyvtpjORc9Mmi%2BKxUGJztuhglPiuC1u%2BFykRlD6TtP9isT3Kn4UeRpkJgYWh2o0Y4GSmYI'}};SSO key in stage:
params:{sso_token:'LY39txV1FcypbzOB9385pRTEI%2B2kEfNxK/gdkTszw%2BEIdmPUgPAgC5txRSlx2noiQg1Bw7oIrzJFW39XCQG12gBLwwlvT9%2BIACfjnNPo2/XP6N/rm2hKaEkOGbX5Z%2BfljpoC/VDZLI/uMzTwVBxueW%2BRDu5A9R6fxNJdQWH5wWG9%2BgEBZpQfasrNlsdm3aL16v7xFVBaKrol7JXreOZu9vnDmXfI4tNp7wC5A9BtpNXKq4ZhnI%2BftrNynBmgHfKa0tvsb8Fp0NaEX73EKGhhBm6Qcp2UbTVeZSmn1I3IMOA='}
Also now when users click sign-in on the UserEcho side it will redirect user to the your authorization url.
Also now when users click sign-in on the UserEcho side it will redirect user to the your authorization url.