Skip Navigation

Base64 encoded string may be included in Toolset Forms notifications or other plugin’s output

Resolved

Reported for: Toolset Views 3.1.0

Symptoms

When you use a View before or after a Toolset Form block, or some third-party blocks, it may happen that Toolset Forms notifications, or output from those third-party blocks present a Base64 encoded string.

It looks like this:

Lndwdi12aWV3LW91dHB1dFtkYXRhLXRvb2xzZXQtdmlld3Mtdmlldy1lZGl0b3I9ImM5OWViZjRhMmVjZGJmNzBmZmMyNGI5NmFjYTg3YzBhIl0gLmpzLXdwdi1sb29wLXdyYXBwZXIgPiAudGItZ3JpZCB7IGdyaWQtdGVtcGxhdGUtY29sdW1uczogbWlubWF4KDAsIDAuMzMzM2ZyKSBtaW5tYXgoMCwgMC4zMzMzZnIpIG1pbm1heCgwLCAwLjMzMzNmcik7Z3JpZC1hdXRvLWZsb3c6IHJvdyB9IEBtZWRpYSBvbmx5IHNjcmVlbiBhbmQgKG1heC13aWR0aDogNzgxcHgpIHsgLndwdi12aWV3LW91dHB1dFtkYXRhLXRvb2xzZXQtdmlld3Mtdmlldy1lZGl0b3I9ImM5OWViZjRhMmVjZGJmNzBmZmMyNGI5NmFjYTg3YzBhIl0gPiAudGItZ3JpZC1jb2x1bW46bnRoLW9mLXR5cGUoM24gKyAxKSB7IGdyaWQtY29sdW1uOiAxIH0gLndwdi12aWV3LW91dHB1dFtkYXRhLXRvb2xzZXQtdmlld3Mtdmlldy1lZGl0b3I9ImM5OWViZjRhMmVjZGJmNzBmZmMyNGI5NmFjYTg3YzBhIl0gPiAudGItZ3JpZC1jb2x1bW46bnRoLW9mLXR5cGUoM24gKyAyKSB7IGdyaWQtY29sdW1uOiAyIH0gLndwdi12aWV3LW91dHB1dFtkYXRhLXRvb2xzZXQtdmlld3Mtdmlldy1lZGl0b3I9ImM5OWViZjRhMmVjZGJmNzBmZmMyNGI5NmFjYTg3YzBhIl0gPiAudGItZ3JpZC1jb2x1bW46bnRoLW9mLXR5cGUoM24gKyAzKSB7IGdyaWQtY29sdW1uOiAzIH0gLndwdi12aWV3LW91dHB1dFtkYXRhLXRvb2xzZXQtdmlld3Mtdmlldy1lZGl0b3I9ImM5OWViZjRhMmVjZGJmNzBmZmMyNGI5NmFjYTg3YzBhIl0gLmpzLXdwdi1sb29wLXdyYXBwZXIgPiAudGItZ3JpZCB7IGdyaWQtdGVtcGxhdGUtY29sdW1uczogbWlubWF4KDAsIDAuMzMzM2ZyKSBtaW5tYXgoMCwgMC4zMzMzZnIpIG1pbm1heCgwLCAwLjMzMzNmcik7Z3JpZC1hdXRvLWZsb3c6IHJvdyB9ICB9IEBtZWRpYSBvbmx5IHNjcmVlbiBhbmQgKG1heC13aWR0aDogNTk5cHgpIHsgLndwdi12aWV3LW91dHB1dFtkYXRhLXRvb2xzZXQtdmlld3Mtdmlldy1lZGl0b3I9ImM5OWViZjRhMmVjZGJmNzBmZmMyNGI5NmFjYTg3YzBhIl0gID4gLnRiLWdyaWQtY29sdW1uIHsgZ3JpZC1jb2x1bW46IDEgIWltcG9ydGFudCB9IC53cHYtdmlldy1vdXRwdXRbZGF0YS10b29sc2V0LXZpZXdzLXZpZXctZWRpdG9yPSJjOTllYmY0YTJlY2RiZjcwZmZjMjRiOTZhY2E4N2MwYSJdIC5qcy13cHYtbG9vcC13cmFwcGVyID4gLnRiLWdyaWQgeyBncmlkLXRlbXBsYXRlLWNvbHVtbnM6IG1pbm1heCgwLCAxZnIpO2dyaWQtYXV0by1mbG93OiByb3cgfSAgfSA=Welcome to WordPress. This is your first post. Edit or delete it, then start writing!

Or like this:

Lndwdi12aWV3LW91dHB1dFtkYXRhLXRvb2xzZXQtdmlld3Mtdmlldy1lZGl0b3I9IjM4OGU1Yjc5OTRiMzQzODE3MmVhNzg0ZGUxMjgyOTg0Il0gLmpzLXdwdi1sb29wLXdyYXBwZXIgPiAudGItZ3JpZCB7IGdyaWQtdGVtcGxhdGUtY29sdW1uczogbWlubWF4KDAsIDAuMzMzM2ZyKSBtaW5tYXgoMCwgMC4zMzMzZnIpIG1pbm1heCgwLCAwLj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mlld3Mtdmlldy1lZGl0b3I9IjM4OGU1Yjc5OTRiMzQzODE3MmVhNzg0ZGUxMjgyOTg0Il0gID4gLnRiLWdyaWQtY29sdW1uIHsgZ3JpZC1jb2x1bW46IDEgIWltcG9ydGFudCB9IC53cHYtdmlldy1vdXRwdXRbZGF0YS10b29sc2V0LXZpZXdzLXZpZXctZWRpdG9yPSIzODhlNWI3OTk0YjM0MzgxNzJlYTc4NGRlMTI4Mjk4NCJdIC5qcy13cHYtbG9vcC13cmFwcGVyID4gLnRiLWdyaWQgeyBncmlkLXRlbXBsYXRlLWNvbHVtbnM6IG1pbm1heCgwLCAxZnIpO2dyaWQtYXV0by1mbG93OiByb3cgfSAgfSA=
if ( ! document.getElementById( 'toolset-blocks-styling' ) ) { document.head.insertAdjacentHTML( 'beforeend', '' ); } var style = document.getElementById( 'toolset-blocks-styling' ); var styleTmp = document.querySelector( '.toolset-blocks-styling-tmp' ); if( style && styleTmp ) { var currentStyle = style.innerHTML; var newStyle = window.atob( styleTmp.innerHTML ); if( currentStyle.indexOf( newStyle ) !== -1 ) { // newStyle is already part of currentStyle. // Do Nothing. } else if( newStyle.indexOf( currentStyle ) !== -1 ) { // currentStyle is part of newStyle. Only use newStyle. style.innerHTML = newStyle; } else { // newStyle is not part of currentStyle, neither is currentStyle part of newStyle. // Keep currentStyle and append newStyle. style.appendChild( document.createTextNode( newStyle ) ); } } var styleTmp = document.getElementsByClassName( 'toolset-blocks-styling-tmp' ); while( styleTmp[0] ) { styleTmp[0].parentNode.removeChild( styleTmp[0] ); } var scriptTmp = document.getElementsByClassName( 'toolset-blocks-script-tmp' ); while( scriptTmp[0] ) { scriptTmp[0].parentNode.removeChild( scriptTmp[0] ); }

Workaround

  1. Download this file
  2. Update to latest Views 3.1.2 or Toolset Blocks 1.1.2
  3. Replace ../plugins/wp-views/vendor/toolset/common-es/php/Block/Style/Loader.php with the attached Loader.php. OR
  4. Replace ../plugins/toolset-blocks/vendor/toolset/common-es/php/Block/Style/Loader.php with the attached Loader.php
  5. Replace any other occurrence of this file in all other Toolset Plugins, where you can find the vendor/toolset/common-es/php/Block/Style/Loader.php file (Toolset Forms, or Layouts, for example)

Comments are closed