{"action":"created","issue":{"url":"https://api.github.com/repos/invoiceninja/invoiceninja/issues/1699","repository_url":"https://api.github.com/repos/invoiceninja/invoiceninja","labels_url":"https://api.github.com/repos/invoiceninja/invoiceninja/issues/1699/labels{/name}","comments_url":"https://api.github.com/repos/invoiceninja/invoiceninja/issues/1699/comments","events_url":"https://api.github.com/repos/invoiceninja/invoiceninja/issues/1699/events","html_url":"https://github.com/invoiceninja/invoiceninja/issues/1699","id":263679281,"number":1699,"title":"Updating APP_KEY and APP_CIPHER","user":{"login":"freskimo","id":12798467,"avatar_url":"https://avatars3.githubusercontent.com/u/12798467?v=4","gravatar_id":"","url":"https://api.github.com/users/freskimo","html_url":"https://github.com/freskimo","followers_url":"https://api.github.com/users/freskimo/followers","following_url":"https://api.github.com/users/freskimo/following{/other_user}","gists_url":"https://api.github.com/users/freskimo/gists{/gist_id}","starred_url":"https://api.github.com/users/freskimo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freskimo/subscriptions","organizations_url":"https://api.github.com/users/freskimo/orgs","repos_url":"https://api.github.com/users/freskimo/repos","events_url":"https://api.github.com/users/freskimo/events{/privacy}","received_events_url":"https://api.github.com/users/freskimo/received_events","type":"User","site_admin":false},"labels":[{"id":67788936,"url":"https://api.github.com/repos/invoiceninja/invoiceninja/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-10-07T23:22:04Z","updated_at":"2017-10-08T13:29:32Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nIs there a way to update the key and cipher on a production server w/o losing data (encrypted with old key and cipher)? After upgrading the system suggests `php artisan ninja:update-key`.\r\n\r\nHowever, when this command is run it complains about the cipher in .env:\r\n`APP_KEY=SomeRandomString\r\nAPP_CIPHER=rijndael-128`\r\nSo I first change the cipher to a newer one. Of course the data in the db can not get decrypted because the cipher changed :confused: ?\r\n\r\nGenerating a new key is not possible because client portals and gateways can't get decrypted anymore.\r\n\r\nWhat is the best way to update key and cipher with a running database?"},"comment":{"url":"https://api.github.com/repos/invoiceninja/invoiceninja/issues/comments/335006711","html_url":"https://github.com/invoiceninja/invoiceninja/issues/1699#issuecomment-335006711","issue_url":"https://api.github.com/repos/invoiceninja/invoiceninja/issues/1699","id":335006711,"user":{"login":"freskimo","id":12798467,"avatar_url":"https://avatars3.githubusercontent.com/u/12798467?v=4","gravatar_id":"","url":"https://api.github.com/users/freskimo","html_url":"https://github.com/freskimo","followers_url":"https://api.github.com/users/freskimo/followers","following_url":"https://api.github.com/users/freskimo/following{/other_user}","gists_url":"https://api.github.com/users/freskimo/gists{/gist_id}","starred_url":"https://api.github.com/users/freskimo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freskimo/subscriptions","organizations_url":"https://api.github.com/users/freskimo/orgs","repos_url":"https://api.github.com/users/freskimo/repos","events_url":"https://api.github.com/users/freskimo/events{/privacy}","received_events_url":"https://api.github.com/users/freskimo/received_events","type":"User","site_admin":false},"created_at":"2017-10-08T13:29:32Z","updated_at":"2017-10-08T13:29:32Z","author_association":"NONE","body":"```\r\n    'key' => env('APP_KEY', 'SomeRandomStringSomeRandomString'),\r\n\r\n    'cipher' => env('APP_CIPHER', 'AES-256-CBC'),\r\n\r\n```\r\nIf I just change the cipher en pass in the `env`. all the client platform can not be decrypted.\r\nAlso for changing the cipher I need a 32bit passphrase and i used the default `SomeRandomString`."}}
{"actor":{"display_login":"freskimo"}}