blackberry / webworks-gui

GUI Tool for WebWorks 2.0
https://developer.blackberry.com/html5/
Apache License 2.0
3 stars 5 forks source link

Unable to set icons and splashscreen images as "Victim" #66

Open jengee opened 10 years ago

jengee commented 10 years ago

Scenario: Admin on Win7-64b has installed WW SDK 2.0.0.61-Gold onto the machine Victim is the standard user on Win7-64b.

Victim is able to create a WW project in it's own location that it has access to and is able to make changes to the config.xml file of that project. Victim is unable to set the icon to the project nor is able to set the splashscreen img.

UI does not respond when you provide a valid path of the img relative to www. (eg. img\my Logos\Emule-icon.png) I've confirmed that the image does indeed exists.

Node responds back with the following: 127.0.0.1 - - [Thu, 13 Feb 2014 20:05:51 GMT] "GET /previewImage?path=D%3A%5Cvic tim%5CWebWorks+Projects%5CFireFox2&filePath=img%5Cmy+Logos%5CEmule-icon.png HTTP /1.1" 500 978 "http://localhost:3123/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2 7.0) Gecko/20100101 Firefox/27.0" 127.0.0.1 - - [Thu, 13 Feb 2014 20:05:52 GMT] "GET /resourceExists?path=D%3A%5Cv ictim%5CWebWorks+Projects%5CFireFox2&filePath=img%5Cmy+Logos%5CEmule-icon.png HT TP/1.1" 200 92 "http://localhost:3123/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv: 27.0) Gecko/20100101 Firefox/27.0" Error: EPERM, operation not permitted 'C:\PROGRA~2\BB10WE~1.61\WEBWOR~2\public\i mg\tmp\1120320340.png' at Object.fs.openSync (fs.js:427:18) at Object.fs.writeFileSync (fs.js:966:15) at Object.module.exports.copyFile (C:\PROGRA~2\BB10WE~1.61\WEBWOR~2\lib\util .js:80:16) at module.exports.get (C:\PROGRA~2\BB10WE~1.61\WEBWOR~2\routes\previewImage. js:52:25) at callbacks (C:\PROGRA~2\BB10WE~1.61\WEBWOR~2\node_modules\express\lib\rout er\index.js:164:37) at param (C:\PROGRA~2\BB10WE~1.61\WEBWOR~2\node_modules\express\lib\router\i ndex.js:138:11) at pass (C:\PROGRA~2\BB10WE~1.61\WEBWOR~2\node_modules\express\lib\router\in dex.js:145:5) at Router._dispatch (C:\PROGRA~2\BB10WE~1.61\WEBWOR~2\node_modules\express\l ib\router\index.js:173:5) at Object.router (C:\PROGRA~2\BB10WE~1.61\WEBWOR~2\node_modules\express\lib\ router\index.js:33:10) at next (C:\PROGRA~2\BB10WE~1.61\WEBWOR~2\node_modules\express\node_modules\ connect\lib\proto.js:190:15)

jengee commented 10 years ago

Looking at the error msg in node a little further,

Error: EPERM, operation not permitted 'C:\PROGRA~2\BB10WE~1.61\WEBWOR~2\public\i mg\tmp\1120320340.png'

It turns out that the image 1120320340.png does not exist in that location. And checking that location a little further it turns out that as victim I don't have permission to create a file in that directory:

C:\PROGRA~2\BB10WE~1.61\WEBWOR~2\public\img\tmp>touch somefile.txt touch: creating `somefile.txt': Permission denied

On the bright side, you can still save the changes into your config.xml file and you are still able to build the app. It's just the UI won't be able to display your image.