I am working on a site that allows models to be uploaded.
the models are json format like this :
{"meta":{"format_version":"3.0","model_format":"bedrock_old","box_uv":true},"name":"crocodile","geo_name":"crocodile","resolution":{"width":128,"height":128},"elements":[{"name":"body","from":[-4.5,3,-11],"to":[4.5,12,9],"autouv":0,"color":0,"origin":[0,0,0],"uuid":"dc9860c3-1826-d5a0-5475-140558d9bcbd"},{"name":"head","from":[-4,3.5,-13],"to":[4,11.5,-11],"autouv":0,"color":1,"origin":[0,0,0],"uv_offset":[44,45],"uuid":"64585c76-5a21-4d25-e334-afdc62e32bec"},{"name":"jawtop","from":[-4,7,-19],"to":[4,11,-13],"autouv":0,"color":2,"origin":[0,0,0],"uv_offset":[60,29],"uuid":"08ff348f-2450-1885-c0f6-1754cd0361e0"},{"name":"jawtop","from":[-3,7,-25],"to":[3,10,-19],"autouv":0,"color":2,"origin":[0,0,0],"uv_offset":[0,45],"uuid":"ce05463f-09fe-45c3-f038-016152a1d962"},{"name":"jawtop","from":[-2,7,-29],"to":[2,9,-25],"autouv":0,"color":2,"origin":[0,0,0],"uv_offset":[22,55],"uuid":"68004a0b-3d5e-1628-bc01-f97fc31d7add"},{"name":"jawtop","from":[-3,11,-17],"to":[-1,12,-14],"autouv":0,"color":2,"origin":[0,0,0],"uv_offset":[0,71],"uuid":"1f51dc8c-bce3-f6b1-e3ce-b8bd95cfb0b6"},{"name":"jawtop","from":[1,11,-17],"to":[3,12,-14],"autouv":0,"color":2,"origin":[0,0,0],"uv_offset":[10,71],"uuid":"a5e2642b-891a-8531-068a-f58f6773086d"},{"name":"jawbottom","from":[-3.5,4,-24],"to":[3.5,7,-13],"autouv":0,"color":3,"origin":[0,0,0],"uv_offset":[58,0],"uuid":"ad1c59ee-6f3f-07ef-fcdc-190444c48dc7"},{"name":"jawbottom","from":[-2.5,5,-30],"to":[2.5,7,-24],"autouv":0,"color":3,"origin":[0,0,0],"uv_offset":[0,55],"uuid":"750a2256-945c-2ea9-b2a3-eaf1af4b55ec"},{"name":"leg0","from":[3.5,2,5],"to":[5.5,7,8],"autouv":0,"color":4,"origin":[0,0,0],"uv_offset":[20,63],"uuid":"80425fb4-9022-e3f0-369c-4327b745fb92"},{"name":"leg0bot","from":[3.5,-1,6],"to":[5.5,3,8],"autouv":0,"color":5,"origin":[0,0,0],"uv_offset":[28,71],"uuid":"6afca6bb-c3b1-3284-1c00-ef2028a079aa"},{"name":"leg1","from":[-5.5,2,5],"to":[-3.5,7,8],"autouv":0,"color":6,"origin":[0,0,0],"uv_offset":[52,55],"uuid":"a7c6896b-f5af-9216-3cd7-0ad96fe57966"},{"name":"leg1bot","from":[-5.5,-1,6],"to":[-3.5,3,8],"autouv":0,"color":7,"origin":[0,0,0],"uv_offset":[20,71],"uuid":"675b7a00-486a-568b-9c51-09cef03b2abd"},{"name":"leg2","from":[3.5,2,-9],"to":[5.5,7,-6],"autouv":0,"color":0,"origin":[0,0,0],"uv_offset":[0,63],"uuid":"59aeddb8-d40b-8894-466c-ce509b62ef2f"},{"name":"leg2bot","from":[3.5,-2,-8],"to":[5.5,2,-6],"autouv":0,"color":1,"origin":[0,0,0],"uv_offset":[48,63],"uuid":"240ac047-9697-f70d-88af-2c948ef0a1a2"},{"name":"leg3","from":[-5.5,2,-9],"to":[-3.5,7,-6],"autouv":0,"color":2,"origin":[0,0,0],"uv_offset":[10,63],"uuid":"269587ec-ed0a-74b0-0aac-d1e3f4b757db"},{"name":"leg3bot","from":[-5.5,-2,-8],"to":[-3.5,2,-6],"autouv":0,"color":3,"origin":[0,0,0],"uv_offset":[40,63],"uuid":"97f9b166-f557-ac6b-853e-74e476343c85"},{"name":"tail0","from":[-3.5,4,9],"to":[3.5,11,18],"autouv":0,"color":4,"origin":[0,0,0],"uv_offset":[0,29],"uuid":"eee0a07c-244b-e299-cdbb-f4722dd1d4b8"},{"name":"tail1","from":[-2.5,5,18],"to":[2.5,10,27],"autouv":0,"color":5,"origin":[0,0,0],"uv_offset":[32,29],"uuid":"0688b6e6-6366-6584-3e85-b6308f361a30"},{"name":"tail2","from":[-1.5,6,27],"to":[1.5,9,34],"autouv":0,"color":6,"origin":[0,0,0],"uv_offset":[24,45],"uuid":"37baa016-fdda-f2d8-6b0f-cbec8889a45d"},{"name":"tail3","from":[-0.5,6.5,34],"to":[0.5,8.5,40],"autouv":0,"color":7,"origin":[0,0,0],"uv_offset":[38,55],"uuid":"89277697-7dfb-6b42-2ea4-3d66a07425bb"},{"name":"tail4","from":[-0.5,7,40],"to":[0.5,8,44],"autouv":0,"color":0,"origin":[0,0,0],"uv_offset":[30,63],"uuid":"dc801a46-d1f8-2afd-1221-cbf021fda901"}],"outliner":[{"name":"body","uuid":"08b60937-c59c-d629-428d-dbc1b47bf899","export":true,"isOpen":true,"visibility":true,"autouv":0,"origin":[0,9,0],"children":["dc9860c3-1826-d5a0-5475-140558d9bcbd",{"name":"head","uuid":"794cb49d-09ea-b58a-d62f-7909c5329824","export":true,"isOpen":true,"visibility":true,"autouv":0,"origin":[0,9.5,-11],"children":["64585c76-5a21-4d25-e334-afdc62e32bec",{"name":"jawtop","uuid":"864311e9-ad20-750e-c1bc-d9003d8e09fa","export":true,"isOpen":false,"visibility":true,"autouv":0,"origin":[0,9,-13],"children":["08ff348f-2450-1885-c0f6-1754cd0361e0","ce05463f-09fe-45c3-f038-016152a1d962","68004a0b-3d5e-1628-bc01-f97fc31d7add","1f51dc8c-bce3-f6b1-e3ce-b8bd95cfb0b6","a5e2642b-891a-8531-068a-f58f6773086d"]},{"name":"jawbottom","uuid":"ca3610f0-82e8-c919-0b09-cc448af7db2b","export":true,"isOpen":true,"visibility":true,"autouv":0,"origin":[0,9,-13],"children":["ad1c59ee-6f3f-07ef-fcdc-190444c48dc7","750a2256-945c-2ea9-b2a3-eaf1af4b55ec"]}]},{"name":"leg0","shade":false,"uuid":"1c25265d-b108-2e3a-b48c-1840a8679882","export":true,"isOpen":false,"visibility":true,"autouv":0,"origin":[3.5,9,6.5],"rotation":[-15,0,-30],"children":["80425fb4-9022-e3f0-369c-4327b745fb92",{"name":"leg0bot","shade":false,"uuid":"ccf50fe0-f61d-a385-ae91-1b9cf1cd704a","export":true,"isOpen":false,"visibility":true,"autouv":0,"origin":[4.5,4,6],"rotation":[50,0,0],"children":["6afca6bb-c3b1-3284-1c00-ef2028a079aa"]}]},{"name":"leg1","uuid":"742bd91e-8c68-346f-8171-5fd796e5168b","export":true,"isOpen":false,"visibility":true,"autouv":0,"origin":[-3.5,9,6.5],"rotation":[-15,0,30],"children":["a7c6896b-f5af-9216-3cd7-0ad96fe57966",{"name":"leg1bot","uuid":"f9aac351-dd57-f3c7-8888-aecf46f41bf0","export":true,"isOpen":false,"visibility":true,"autouv":0,"origin":[-4.5,4,6],"rotation":[50,0,0],"children":["675b7a00-486a-568b-9c51-09cef03b2abd"]}]},{"name":"leg2","shade":false,"uuid":"756ef132-6c43-8a05-f00e-89efded63842","export":true,"isOpen":false,"visibility":true,"autouv":0,"origin":[3.5,9,-7.5],"rotation":[-15,0,-30],"children":["59aeddb8-d40b-8894-466c-ce509b62ef2f",{"name":"leg2bot","shade":false,"uuid":"dccb0f87-61fd-f919-3e77-ea01d2b7b921","export":true,"isOpen":false,"visibility":true,"autouv":0,"origin":[4.5,4,-7],"rotation":[50,0,0],"children":["240ac047-9697-f70d-88af-2c948ef0a1a2"]}]},{"name":"leg3","uuid":"8b2f9b00-b22c-5b3c-a530-436a5d9d4a7a","export":true,"isOpen":false,"visibility":true,"autouv":0,"origin":[-3.5,9,-7.5],"rotation":[-15,0,30],"children":["269587ec-ed0a-74b0-0aac-d1e3f4b757db",{"name":"leg3bot","uuid":"a91c7b0e-3d6f-4a0e-18bf-c83531e1ef2e","export":true,"isOpen":false,"visibility":true,"autouv":0,"origin":[-4.5,4,-7],"rotation":[50,0,0],"children":["97f9b166-f557-ac6b-853e-74e476343c85"]}]},{"name":"tail0","uuid":"c3e0f719-cb90-e79f-8664-3b6bc1531c0d","export":true,"isOpen":false,"visibility":true,"autouv":0,"origin":[0,9.5,9],"children":["eee0a07c-244b-e299-cdbb-f4722dd1d4b8",{"name":"tail1","uuid":"0f292741-56cb-0d10-fc48-bb6e00ca2755","export":true,"isOpen":false,"visibility":true,"autouv":0,"origin":[0,9.5,18],"children":["0688b6e6-6366-6584-3e85-b6308f361a30",{"name":"tail2","uuid":"38c0f23e-4aae-37ba-340d-95a042b86cbf","export":true,"isOpen":false,"visibility":true,"autouv":0,"origin":[0,9.5,27],"children":["37baa016-fdda-f2d8-6b0f-cbec8889a45d",{"name":"tail3","uuid":"ba8b9331-6926-6d51-3f9c-b206a4f971b7","export":true,"isOpen":false,"visibility":true,"autouv":0,"origin":[0,9.5,34],"children":["89277697-7dfb-6b42-2ea4-3d66a07425bb",{"name":"tail4","uuid":"e70eca10-4cd6-05eb-d828-02e363c9a3a5","export":true,"isOpen":false,"visibility":true,"autouv":0,"origin":[0,9.5,40],"children":["dc801a46-d1f8-2afd-1221-cbf021fda901"]}]}]}]}]}]}],"textures":[{"path":"crocodile.png","name":"crocodile.png","folder":"","namespace":"","id":"0","particle":false,"mode":"bitmap","saved":true,"uuid":"c62c819f-3c1a-aefb-00ff-415b02e2f7ac","source":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAcyElEQVR4Xu2dCZRddX3Hf/fts89kxQhZCEvUo6BQDQlJCG5d1IoeJCRshpAEEqEICNJqrYpiW3tsKWpRsFVL4egBUYvVgiACcupCrdoAAZIANhCyzJLZ3nJvz+f3v7+XIcyb8zLzcucm3Ms5zMvMe/f/f//f97cv15MGX8fO6wgqvifpVCDDRU8KuUCGip40FwIpljxJpQJZfdYiSac9SadTUqn44vuBFPJZ8VKeVMq+lEoVueb6u70Gb63u2/3jp88IHr3l19JTKlU/05HNyhtXnyDlMvv19ffpTErKJV9K5Yq0NOfkQx/7zqTtue4vt98bG77h447uCLgpRE+nRAIWDDzJ53wFBGd3yfmLJZ/LyOBQUZqbcrK3f1iy2bR4nifZTFqGhktyzWcnDwAv/vfVwTXv+9bLAHD9HWf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+H3rkM91y7CUZ2fzFsiy81g1BGu13oy0GsXHNXJOm88U1EER6lhEw4QMlLX6vTxUPx8DyMwHAgZJwYu9veImUPTrWCj/ssbFWSYyB6PIDbiyM5ejdkApJvIOJ0fOAP91wANhkcXtYNHEAXuv8HiJ64QOn7PcuCOUeE8Pk0aRw84BpOKEPNBwAE9pN8uHITyABQORHHq8FEwDEix6R7yYBQORHHq8FEwDEix6R7yYBQORHHq8FEwDEix6R7yYBQORHHq8FEwDEix6R7yYBQORHHq8FEwDEix6R7yYBQORHHq8FEwDEix6R7yYBQORHHq8FEwDEix6R7yYBQORHHq8FEwDEix6R7yYBQORHHq8FEwDEix6R7yYBQORHHq8FEwDEix6R7yYBQORHHq8FEwDEix6R7yYBQORHHq8FEwDEix6R7yYBQORHHq8FEwDEix6R7yYBQORHHq8FEwDEix6R7yYBQORHHq8FEwDEix6R7yYBQORHHq8FEwDEix6R7yYBQORHHq8FEwDEix6R7yYBQORHHq8FEwDEix6R7yYBQORHHq8FEwDEix6R7yYBQORHHq8FEwDEix6R7yYBQORHHq8FEwDEix6R7yYBQORHHq8FEwDEix6R7yYBQORHHq8FEwDEix6R7yYBQORHHq8FEwDEix6R7yYBQORHHq8FEwDEix6R7+b/AZovzmIGTS/bAAAAAElFTkSuQmCC"}]}
The file is called crocodile.bbmodel
I am looking for a way to allow users to upload .bbmodel files that is safe so that no web shells or malicious code can sneak its way past the upload can you guys help?
From what I know there is no magic button that will let you do this. that said the first thing you will want to do is make sure the uploaded file is valid json. check this Fastest way to check if a string is JSON in PHP?
Next you will need to define which fields in json are valid and what types the value should contain. for this I would create a skeleton versioin of the json string and store it a database field. Examining your json further you might need multiple skeletons for the various repeat or nested elements. eg one for meta like this
"meta":{"format_version":"","model_format":"","box_uv":}
you would want another skeleton for elements probably describing the keys for a single 'element'. and of course validate the textures.source nodes against a base64 encoding.
Next you will want to decide what are acceptable types for each of the field values. compare each field of the submitted json against an acceptable type you define.
once you do all of this validation you can be reasonably sure you have a valid file...I won't say secure or non-malicious but, done properly it will help you ingest the file without errors.
Still not guaranteed to be 'secure' but, it is a reasonable approach and would probably satisfy most due diligence critiques. If anyone can improve and provide more steps or different tricks to secure something like this I'd be glad to hear it.