From d52ef51db040b9e28db3f48037f19eed4d1b6cc1 Mon Sep 17 00:00:00 2001 From: Peter Deltchev Date: Sat, 12 Sep 2015 15:56:22 -0700 Subject: [PATCH] T350: Regenerated encyption keys for all environments and moved sessions to the database. --- config/app.php | 2 +- config/session.php | 4 +-- ...2015_09_12_225021_create_session_table.php | 31 ++++++++++++++++++ resources/environments/.env.example | 2 +- resources/environments/.env.local | 4 +-- resources/environments/.env.production | Bin 513 -> 517 bytes resources/environments/.env.stage | Bin 529 -> 533 bytes 7 files changed, 37 insertions(+), 6 deletions(-) create mode 100644 database/migrations/2015_09_12_225021_create_session_table.php diff --git a/config/app.php b/config/app.php index 97e4e954..a6ebd715 100644 --- a/config/app.php +++ b/config/app.php @@ -80,7 +80,7 @@ return [ 'key' => env('APP_KEY'), - 'cipher' => MCRYPT_RIJNDAEL_256, + 'cipher' => MCRYPT_RIJNDAEL_128, /* |-------------------------------------------------------------------------- diff --git a/config/session.php b/config/session.php index d4ad0f16..e347e35b 100644 --- a/config/session.php +++ b/config/session.php @@ -16,7 +16,7 @@ return [ | */ - 'driver' => env('SESSION_DRIVER', 'file'), + 'driver' => env('SESSION_DRIVER', 'database'), /* |-------------------------------------------------------------------------- @@ -148,6 +148,6 @@ return [ | */ - 'secure' => false, + 'secure' => env('SESSION_HTTPS_ONLY', true), ]; diff --git a/database/migrations/2015_09_12_225021_create_session_table.php b/database/migrations/2015_09_12_225021_create_session_table.php new file mode 100644 index 00000000..ab28f1ab --- /dev/null +++ b/database/migrations/2015_09_12_225021_create_session_table.php @@ -0,0 +1,31 @@ +string('id')->unique(); + $table->text('payload'); + $table->integer('last_activity'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::drop('sessions'); + } +} diff --git a/resources/environments/.env.example b/resources/environments/.env.example index dce9ce8c..b0321a00 100644 --- a/resources/environments/.env.example +++ b/resources/environments/.env.example @@ -8,7 +8,7 @@ DB_DATABASE=homestead DB_USERNAME=homestead DB_PASSWORD=secret -SESSION_DRIVER=file +SESSION_HTTPS_ONLY=false QUEUE_DRIVER=sync MAIL_DRIVER=smtp diff --git a/resources/environments/.env.local b/resources/environments/.env.local index 92fad214..85eaebee 100644 --- a/resources/environments/.env.local +++ b/resources/environments/.env.local @@ -1,14 +1,14 @@ APP_ENV=local APP_DEBUG=true APP_URL=http://pony.fm.local/ -APP_KEY=AQUSDTDK5xA04yb9eO9iwlm72NpC8e90 +APP_KEY=q5lKAapzJwZas0izFS1CfCn3oX8Kk2jj DB_HOST=localhost DB_DATABASE=homestead DB_USERNAME=homestead DB_PASSWORD=secret -SESSION_DRIVER=file +SESSION_HTTPS_ONLY=false QUEUE_DRIVER=sync MAIL_DRIVER=smtp diff --git a/resources/environments/.env.production b/resources/environments/.env.production index 81394d4c7b571e8e117d4f81b0d67608af06ede3..bcc7bf001132189cdf102a924babaa4635bce4f8 100644 GIT binary patch literal 517 zcmV+g0{Z;`M@dveQdv+`0NFFz_qt&;O&f4%`--|-(s_QDUL31IiXS__(xX_pLF`UQ zG61Y5-s?*@JdQ9_Cy#PePIGrJv~elX?`Lsm~y4y6Oo6c`2vl-!b4tF^ftr*ImbcW(f&XL*R3lH#w- zze_Jxy?_u?j6}1%@bt^kIKAv?J#jNJWL6w7GwBX8dg0~XAP?t{DL-oeNx&hf*)*=v ziVQ(EgdkjmqbKZiZbY-=oygJT5wC=w@D&GY$5Pwy-l<|=3>gyR`&96cq zNX;Pp2;VGek2_c1JMnl`ukeRdpCZWIk~CFuVaWqc>*D^GQ|GfQA)YV8HwQNf4L`Rp zhDiQ10_8?J26sJP0B#N*&*8Z`^s6jHWl)~gcz_u;e$yAjH-)a8bh_YYR>YXSsQjrc zUdDjTKBciaocyL$u0n7vrd0xf7PUI{RXt@U1f`;ZlJo`rH3SOVu^C>SNSPC}^so9G Hf+{C{ZFKd5 literal 513 zcmV+c0{;B~M@dveQdv+`034h4GIT{Wl=P}u@z(YO6k8u#8e-F%K^u~OK8J!gKGIX- z1<@k69#tbtA}5Sf?dDJ3JmZ7dSkBN_KMQ`Y4;I5=kQ1gB0Ksavklm&ZSU97j24?13 zm{lRoDiqheI)8+Ux~?O|LY|Snxr0VtaSf63`BK{I$zPv6n#=3iA}}#XsTPhY8bVM* zr+d^xEqc5cx?Y6SAL<=+PUkYbmBMYXL&PH6NNSw=OurvgfAx=w6uXU2O83^OoS>ei z`HEQO0!}ItUG^olPKo*c81y}70!zI)9cp7uViQpVX-5d>@(rD!xv|7O$A3QIrA!@e z3&EBZH;vWi}BGckyq zj{<&G7Jjk>1;3H+&1u~ff|CY7URYCz?kPE~^FieMAF5(2YLC9$eP<89f(1N$f;bCc z22IBRs)L#-%e(+10fs1LKdRg%%hC#kq7jc_EjM=GU@OPM(UxXG-q{O_*Ve?_u@hHN zxhPJiN5<1E;wa5W&r~^OK?Su^Z~DSyMNQfWRORTCA^b5BWOC$VF3xA~6h>h!bm{S= Dv_AD% diff --git a/resources/environments/.env.stage b/resources/environments/.env.stage index 76abe1a3d0208b380d9f4f999d82607c4e30bca2..199dcfa4a19d3aeba61f0fda42e449a65d6cc442 100644 GIT binary patch literal 533 zcmV+w0_yz$M@dveQdv+`0Nk~8l-j|^jT@2Et`TIo?6bT!?#UdkxbiA58tqqaThwgq?`Fdv#?^#+ti6;{vGziSGr zbem?pUP9Ywwsm1m);M?hy%n-+qS?C64AUK62>GZoQi834CFWtys!a|d;7-s z2f*Mb0w%0xYdMnP#)j@$xI%^OPB8Zek@a$?3!<2F+tu^lg{pXS4ccmqaK;o3rF#^7 zJ-u>cDa#xS-m`gg4AU7u(twBXGHqu^!?A8qGryvmDr-};>I{uQ@lDc*d}5lrT(`HA zaXq2PdGJ$NJP{x=f6ooh^Tda^ziiT%N6lNDWU(H?zS843HX|M45Ab%9+Q>17f@Gak z(PL)h##{cUOeB|+6D#zUr)zD}W7xUtuF<+F?3O{mZ-Qi1}kSQUbI0y|IW9u-Op{uFH}Myp@UtzrB5 zaQENLpx3#;>_91qG2Xm#pAL=tR*d{`&|9nlSR$kTro9&x)0tli!4cT*SOLD|9A{Iuv7xC2ulef zdjRwdpsio^10gnR=_zO|aTkYi!o^531NB>UlyYE^HDLGMS5mbCdtw)kSTn{bxo!K| zBhn=8odyQNB1DN5I3_-KHmCJDZD14W_JPg|`R@_d_Wcy5Tl8gd66LxP*H=|kF?gq0 zZp=dHIygdQTE`h$lznnm1ziKmS}FUNWv~nte~#dR((DS}9*_@d&PfZwxAnPKGe|@g TA0Gr4q`1|BDLrhP!YZzFg!l#j