shane-tomlinson / browserid-wordpress

Wordpress plugin that adds Persona authentication
23 stars 16 forks source link

Cannot specify a datauri for site logo in admin #74

Closed pdehaan closed 11 years ago

pdehaan commented 11 years ago

After converting an image to a data uri, I get errors when trying to set the site logo in the Persona settings page.

Steps to reproduce: 1) Go to the Mozilla Persona settings page. 2) Set the site logo to the following [super long] data uri:

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAG0AAABiCAMAAABtcK2xAAAAAXNSR0IArs4c6QAAAGBQTFRFAAAANzc3SEhIJSUl7xkA7OzsaGhodHR0GQYD0RYA5eXlWFhY3d3drxIAvLy8qamp1NTUiYmJw8PDgg0As7OzlZWV+vr68vLygICATggAnZ2dy8vL/xsA/xoA////AAAAyj5oUwAAAAF0Uk5TAEDm2GYAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfZBxATGjnqlAMyAAAJiUlEQVRo3t1a57ajvA6NbTCmml4Ccd7/LT9Jtmkp58xMcn9crZl1SABv1LYkk8vlT0XwUc9JGCbFyC/fFZHqrM/aSqap1Ek/V1x8D2ss+zpidyeKd5kpu5SBvrLSrb5G7HNYVRJWK5QTNtZ9OJfwv9W6SAb9Iby0HDpxfyJCXiuurLYyKz8Bx65Geyw1NXmeN5N6Bj1/AE4mWerWm/JgsXKL80mtkGqaEF9k7b967Go6t+oUA4oXhJwsUh7fltsSoyd7+U9gfA6lU6AhLFLsRkcNQYG2MVh2auDjXZf/khUyrMWqGKkUgNNgbVAzVg0otQSNUx3/cPP3WS86U3mPBdaIdmmVB7dbgFD5MV7E8NemZPWQHqxIxgOshiwZxD40pzxXHi39W5dlmc/nySq25PQpJyxvQFB0ySef8Kb7S5cN7ZrQsQ2NgJyjyKjgL0gB+3HaTCn7v2KUanUZqhbE4KmlUXHuFF2aHB4gCCb4GN+ZVi5M7mCR6E/jUmgjtwcG96gcQyRYAuXQYopLsK26BXcRgcvuDekIoTX/WaiIdo0P55vY5hrGCaAthIMOBCvmFDuiFipurPN0P/9BRWBzc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PCp6ZuM7dCsk+xPKkjxldev3ms/odncEGTSn9AK79wLTeDrho51p33p9B6N2opO69I93Rs0cpuDIMfZ6nVhidmWe4/GuuQQwe/QyhOaFitFUYT+iMbLU778uW42rL0P32bAbHOqbrNfoD31Wzpsav6AltJzVdCYXX9Go2uMbYXnNQfLjWreodXCWaHwa/+AZlmNXohQvuHllox2b7feoV3Nfu2f0EiPPhKQeb27KrKUJ5zs0ZCCaHIkNEz9zpuBfDK8zzc4wqWG66h792ycGKsvWhIsURuaDVsuXD8E5cgyfitlYQ+4tdErNOs5Vx+ii/P7Vhb2NcCpjQ1R7UoMSw6Xm/nC1tqjHU/b2yL3ImLwpSG6PKAVPh86+xMi4wLXcjZYVfq7+wKOkgroXeuWfrcQtbrtmO1+td9uFOm1DIdwdj+l4HovWJUkXizdNJn0Pb2uSaGTHTI4nda9LcXAlPSa1nn7fCD2w8zaWIiDnC8WDIeew5HgMpLYJgkJj/Qfj//yUaK34OkAAAAASUVORK5CYII=

3) Save.

Actual results:

Invalid Site logo

shane-tomlinson commented 11 years ago

@pdehaan - nope, Persona doesn't yet support it. I will re-enable accepting data-uris whenever the change to support data-URIs makes its way to Persona prod.

shane-tomlinson commented 11 years ago

Closing as waiting on upstream.

shane-tomlinson commented 11 years ago

To be clear, the full fix to this does require uncommenting code in the wordpress plugin.

shane-tomlinson commented 11 years ago

re-opening for that reason.

shane-tomlinson commented 11 years ago

re-enabled since this is now in Persona production.