insecure content warnings on various admin pages #59

<a href='#crh-start'></a><a href='#crh-data-%7B%22processed%22%3A%20%5B%22https%3A//github.com/zencart/zc-v1-series/pull/68%23issuecomment-48426548%22%2C%20%22https%3A//github.com/zencart/zc-v1-series/pull/68%23issuecomment-48427099%22%2C%20%22https%3A//github.com/zencart/zc-v1-series/pull/68%23issuecomment-48427694%22%2C%20%22https%3A//github.com/zencart/zc-v1-series/pull/68%23issuecomment-48428690%22%2C%20%22https%3A//github.com/zencart/zc-v1-series/pull/68%23issuecomment-48429141%22%2C%20%22https%3A//github.com/zencart/zc-v1-series/pull/68%23issuecomment-48429467%22%5D%2C%20%22comments%22%3A%20%7B%22General%20Comment%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/zencart/zc-v1-series/pull/68%23issuecomment-48426548%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22can%20you%20rebase%20this%20to%20clean%20up%20the%20pr%20%3F%22%2C%20%22created_at%22%3A%20%222014-07-09T03%3A37%3A19Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/227354%3F%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/zcwilt%22%7D%7D%2C%20%7B%22body%22%3A%20%22%3A%2B1%3A%22%2C%20%22created_at%22%3A%20%222014-07-09T03%3A49%3A09Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/2678085%3F%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/bislewl%22%7D%7D%2C%20%7B%22body%22%3A%20%22Unfortunately%20your%20commit%20doesn%27t%20quite%20address%20the%20problem.%20While%20unusual%2C%20it%20is%20possible%20that%20some%20people%20may%20still%20be%20running%20their%20admin%20without%20SSL%2C%20or%20they%20may%20be%20in%20development%20mode%20again%20where%20they%20are%20running%20admin%20without%20SSL.%20The%20logic%2C%20and%20in%20this%20case%20the%20admin%20zen_image%20function%20needs%20to%20be%20fixed%20as%20well%2C%20In%20fact%20what%20is%20probably%20need%20is%20an%20admin%20zen_catalog_image%20function.%20%22%2C%20%22created_at%22%3A%20%222014-07-09T04%3A01%3A26Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/227354%3F%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/zcwilt%22%7D%7D%2C%20%7B%22body%22%3A%20%22what%20about%20if%20we%20did%5Cr%5CnIF%28ENABLE_SSL_ADMIN%20%3D%3D%20%27true%27%29%7B%5Cr%5Cnnew%20defines%5Cr%5Cn%7D%5Cr%5Cnelse%7B%5Cr%5Cnold%20defines%5Cr%5Cn%7D%22%2C%20%22created_at%22%3A%20%222014-07-09T04%3A25%3A05Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/2678085%3F%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/bislewl%22%7D%7D%2C%20%7B%22body%22%3A%20%22No.%5Cr%5Cn%5Cr%5CnI%20would%20have%20thought%20that%20the%20correct%20fix%20is%20to%20work%20in%20the%20zen_image%20function%20to%20have%20it%20correctly%20build%20the%20image%20URL%20based%20on%20whether%20%24request_type%20is%20NONSSL%20or%20SSL%2C%20and%20that%20would%20then%20use%20HTTP_CATALOG_SERVER%20%2B%20DIR_WS_CATALOG%20or%20HTTPS_CATALOG_SERVER%20%2B%20DIR_WS_HTTPS_CATALOG%2C%20much%20like%20zen_href_catalog_link%20does%20....%20come%20to%20think%20of%20it%2C%20doesn%27t%20zen_href_catalog_link%20take%20care%20of%20this%3F%22%2C%20%22created_at%22%3A%20%222014-07-09T04%3A37%3A14Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/404472%3F%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/drbyte%22%7D%7D%2C%20%7B%22body%22%3A%20%22I%20agree%2C%20I%27v%20reverted%20my%20commit%22%2C%20%22created_at%22%3A%20%222014-07-09T04%3A43%3A16Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/2678085%3F%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/bislewl%22%7D%7D%5D%2C%20%22title%22%3A%20%22General%20Comment%22%7D%7D%7D'></a>
<a href='https://www.codereviewhub.com/'><img src='http://www.codereviewhub.com/site/github-bar.png' height=40></a>
- [ ] <a href='#crh-comment-General Comment'></a> <img src='http://www.codereviewhub.com/site/github-remaining.png' height=16 width=60>&nbsp;<b><a href='https://github.com/zencart/zc-v1-series/pull/68#issuecomment-48426548'>General Comment</a></b>
- <a href='https://github.com/zcwilt'><img border=0 src='https://avatars.githubusercontent.com/u/227354?size=16' height=16 width=16'></a> can you rebase this to clean up the pr ?
- <a href='https://github.com/bislewl'><img border=0 src='https://avatars.githubusercontent.com/u/2678085?size=16' height=16 width=16'></a> :+1:
- <a href='https://github.com/zcwilt'><img border=0 src='https://avatars.githubusercontent.com/u/227354?size=16' height=16 width=16'></a> Unfortunately your commit doesn't quite address the problem. While unusual, it is possible that some people may still be running their admin without SSL, or they may be in development mode again where they are running admin without SSL. The logic, and in this case the admin zen_image function needs to be fixed as well, In fact what is probably need is an admin zen_catalog_image function.
- <a href='https://github.com/bislewl'><img border=0 src='https://avatars.githubusercontent.com/u/2678085?size=16' height=16 width=16'></a> what about if we did
IF(ENABLE_SSL_ADMIN == 'true'){
new defines
}
else{
old defines
}
- <a href='https://github.com/drbyte'><img border=0 src='https://avatars.githubusercontent.com/u/404472?size=16' height=16 width=16'></a> No.
I would have thought that the correct fix is to work in the zen_image function to have it correctly build the image URL based on whether $request_type is NONSSL or SSL, and that would then use HTTP_CATALOG_SERVER + DIR_WS_CATALOG or HTTPS_CATALOG_SERVER + DIR_WS_HTTPS_CATALOG, much like zen_href_catalog_link does .... come to think of it, doesn't zen_href_catalog_link take care of this?
- <a href='https://github.com/bislewl'><img border=0 src='https://avatars.githubusercontent.com/u/2678085?size=16' height=16 width=16'></a> I agree, I'v reverted my commit


<a href='https://www.codereviewhub.com/zencart/zc-v1-series/pull/68?mark_as_completed=1'><img src='http://www.codereviewhub.com/site/github-mark-as-completed.png' height=26></a>&nbsp;<a href='https://www.codereviewhub.com/zencart/zc-v1-series/pull/68?approve=1'><img src='http://www.codereviewhub.com/site/github-approve.png' height=26></a>&nbsp;<a href='https://github.com/zencart/zc-v1-series/pull/68'><img src='http://www.codereviewhub.com/site/github-refresh.png' height=26></a>
<a href='#crh-end'></a>