You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I apologize in advance for not implementing a fix and if I am violating any style guides, but this is the first issue I've ever reported.
If storage/framework/views does not exist and ./artisan view:clear is issued as root, the command deletes /bin and /usr/bin off the server. I am not sure what else is deleted, because at that point the server is pretty much dead. If you do not run it as root, I am not sure what it's going to delete, but it looks like it will try to delete "all files on server"
My preliminary search has lead me to the file : vendor\laravel\framework\src\Illuminate\Foundation\Console\ViewClearCommand.php
public function fire(){
$views = $this->files->glob($this->laravel['config']['view.compiled'].'/*');
foreach ($views as $view) {
$this->files->delete($view);
}
$this->info('Compiled views cleared!');
}
I believe this needs an additional check for $this->laravel['config']['view.compiled'] returning null, for file existence of that or possibly restructuring the string building so that it is ALWAYS prefixed to the app_dir.
I will be attempting to patch it for myself, but I am not sure where else a string is being built and passed to "glob" in such a way that it may be interpreted as root, or if I have not identified the actual issue.
Thanks in advance for any advice.
The text was updated successfully, but these errors were encountered:
Thanks. It seemed like a simple thing to do, but I've only ever looked through the source for "undocumented features" and wanted to make sure it was as simple as it sounded, since I dont know anything about $this->files is or $this->laravel. So many moving parts...
I apologize in advance for not implementing a fix and if I am violating any style guides, but this is the first issue I've ever reported.
If storage/framework/views does not exist and ./artisan view:clear is issued as root, the command deletes /bin and /usr/bin off the server. I am not sure what else is deleted, because at that point the server is pretty much dead. If you do not run it as root, I am not sure what it's going to delete, but it looks like it will try to delete "all files on server"
My preliminary search has lead me to the file : vendor\laravel\framework\src\Illuminate\Foundation\Console\ViewClearCommand.php
I believe this needs an additional check for $this->laravel['config']['view.compiled'] returning null, for file existence of that or possibly restructuring the string building so that it is ALWAYS prefixed to the app_dir.
I will be attempting to patch it for myself, but I am not sure where else a string is being built and passed to "glob" in such a way that it may be interpreted as root, or if I have not identified the actual issue.
Thanks in advance for any advice.
The text was updated successfully, but these errors were encountered: