{"action":"opened","issue":{"url":"https://api.github.com/repos/opencart/opencart/issues/7097","repository_url":"https://api.github.com/repos/opencart/opencart","labels_url":"https://api.github.com/repos/opencart/opencart/issues/7097/labels{/name}","comments_url":"https://api.github.com/repos/opencart/opencart/issues/7097/comments","events_url":"https://api.github.com/repos/opencart/opencart/issues/7097/events","html_url":"https://github.com/opencart/opencart/issues/7097","id":391089973,"node_id":"MDU6SXNzdWUzOTEwODk5NzM=","number":7097,"title":"Old file upload method still used in some places","user":{"login":"ADDCreative","id":2039130,"node_id":"MDQ6VXNlcjIwMzkxMzA=","avatar_url":"https://avatars2.githubusercontent.com/u/2039130?v=4","gravatar_id":"","url":"https://api.github.com/users/ADDCreative","html_url":"https://github.com/ADDCreative","followers_url":"https://api.github.com/users/ADDCreative/followers","following_url":"https://api.github.com/users/ADDCreative/following{/other_user}","gists_url":"https://api.github.com/users/ADDCreative/gists{/gist_id}","starred_url":"https://api.github.com/users/ADDCreative/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ADDCreative/subscriptions","organizations_url":"https://api.github.com/users/ADDCreative/orgs","repos_url":"https://api.github.com/users/ADDCreative/repos","events_url":"https://api.github.com/users/ADDCreative/events{/privacy}","received_events_url":"https://api.github.com/users/ADDCreative/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-14T12:21:28Z","updated_at":"2018-12-14T12:21:28Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"There are still some places in the code which use the old method for customer file upload options.\r\n\r\nFor example, reordering a product with a file upload loses the file.\r\n\r\nThe line below still uses encryption on the file name instead of the code for a database lookup.\r\nhttps://github.com/opencart/opencart/blob/3.1.0.0_a1/upload/catalog/controller/account/order.php#L381\r\n```php\r\n$option_data[$order_option['product_option_id']] = $this->encryption->encrypt($this->config->get('config_encryption'), $order_option['value']);\r\n```\r\nShould be.\r\n```php\r\n$option_data[$order_option['product_option_id']] = $order_option['value'];\r\n```\r\nAlso ```$this->encryption->decrypt($option['value']);``` should be replace with code using ```$this->model_tool_upload->getUploadByCode($option['value']);``` at the following places.\r\nhttps://github.com/opencart/opencart/blob/3.1.0.0_a1/upload/catalog/controller/extension/payment/amazon_login_pay.php#L335\r\nhttps://github.com/opencart/opencart/blob/3.1.0.0_a1/upload/catalog/controller/extension/payment/amazon_login_pay.php#L450"}}
{"actor":{"display_login":"ADDCreative"}}