Merge branch 'develop' into wip/image-resizing

This commit is contained in:
Luke Towers 2020-08-13 03:11:20 -06:00
commit f54b167f00
4 changed files with 38 additions and 30 deletions

View File

@ -307,11 +307,11 @@ return [
'auto_closing' => 'Cerrado de etiquetas automático',
'show_invisibles' => 'Mostrar caracteres invisibles',
'show_gutter' => 'Mostrar numeros de línea',
'basic_autocompletion'=> 'Autocompletado Basico (Ctrl + Espacio)',
'live_autocompletion'=> 'Autocompletado en Vivo',
'enable_snippets'=> 'Activar uso de Snippets',
'display_indent_guides'=> 'Mostrar Guias de Identado',
'show_print_margin'=> 'Mostrar Margen de impresión',
'basic_autocompletion' => 'Autocompletado Basico (Ctrl + Espacio)',
'live_autocompletion' => 'Autocompletado en Vivo',
'enable_snippets' => 'Activar uso de Snippets',
'display_indent_guides' => 'Mostrar Guias de Identado',
'show_print_margin' => 'Mostrar Margen de impresión',
'mode_off' => 'Off',
'mode_fluid' => 'Fluido',
'40_characters' => '40 Caracteres',
@ -396,7 +396,8 @@ return [
'filter' => [
'all' => 'todo',
'options_method_not_exists' => "La clase de modelo :model debe definir un método :method() para regresar opciones para el filtro ':filter'.",
'date_all' => 'todo el período'
'date_all' => 'todo el período',
'number_all' => 'todos los números'
],
'import_export' => [
'upload_csv_file' => '1. Subir un archivo CSV',

View File

@ -4,10 +4,11 @@ use File;
use Lang;
use Config;
use Request;
use Cms\Helpers\File as FileHelper;
use October\Rain\Extension\Extendable;
use ApplicationException;
use ValidationException;
use Cms\Helpers\File as FileHelper;
use October\Rain\Extension\Extendable;
use October\Rain\Filesystem\PathResolver;
/**
* The CMS theme asset file class.
@ -287,14 +288,13 @@ class Asset extends Extendable
$directory = $this->theme->getPath() . '/' . $this->dirName . '/';
$filePath = $directory . $fileName;
$resolvedPath = resolve_path($filePath);
// Limit paths to those under the theme's assets directory
if (!starts_with($resolvedPath, $directory)) {
if (!PathResolver::within($filePath, $directory)) {
return false;
}
return $resolvedPath;
return PathResolver::resolve($filePath);
}
/**

View File

@ -4,11 +4,12 @@ use App;
use Lang;
use Event;
use Config;
use October\Rain\Halcyon\Model as HalcyonModel;
use Cms\Contracts\CmsObject as CmsObjectContract;
use ApplicationException;
use ValidationException;
use Exception;
use ValidationException;
use ApplicationException;
use Cms\Contracts\CmsObject as CmsObjectContract;
use October\Rain\Filesystem\PathResolver;
use October\Rain\Halcyon\Model as HalcyonModel;
/**
* This is a base class for all CMS objects - content files, pages, partials and layouts.
@ -229,14 +230,13 @@ class CmsObject extends HalcyonModel implements CmsObjectContract
$directory = $this->theme->getPath() . '/' . $this->getObjectTypeDirName() . '/';
$filePath = $directory . $fileName;
$resolvedPath = resolve_path($filePath);
// Limit paths to those under the corresponding theme directory
if (!starts_with($resolvedPath, $directory)) {
if (!PathResolver::within($filePath, $directory)) {
return false;
}
return $resolvedPath;
return PathResolver::resolve($filePath);
}
/**

View File

@ -33,7 +33,6 @@ return [
'fullscreen' => 'Pantalla completa',
'preview' => 'Previsualizar'
],
'mediamanager' => [
'insert_link' => "Insertar Media Vínculo",
'insert_image' => "Insertar Media Imagen",
@ -45,12 +44,10 @@ return [
'invalid_video_empty_insert' => "Por favor seleccione un archivo de video para insertar.",
'invalid_audio_empty_insert' => "Por favor seleccione un archivo de audio para insertar.",
],
'alert' => [
'confirm_button_text' => 'OK',
'cancel_button_text' => 'Cancelar'
],
'datepicker' => [
'previousMonth' => 'Mes Anterior',
'nextMonth' => 'Mes Siguiente',
@ -58,21 +55,31 @@ return [
'weekdays' => ['Domingo', 'Lunes', 'Martes', 'Miercoles', 'Jueves', 'Viernes', 'Sabado'],
'weekdaysShort' => ['Dom', 'Lun', 'Mar', 'Mie', 'Jue', 'Vie', 'Sab']
],
'filter' => [
'group' => [
'all' => 'todos'
],
'scopes' => [
'apply_button_text' => 'Aplicar',
'clear_button_text' => 'Limpiar',
],
'dates' => [
'all' => 'todos',
'filter_button_text' => 'Filtro',
'reset_button_text' => 'Restablecer',
'all' => 'todas',
'filter_button_text' => 'Filtrar',
'reset_button_text' => 'Restablecer',
'date_placeholder' => 'Fecha',
'after_placeholder' => 'Despues',
'before_placeholder' => 'Antes'
]
'after_placeholder' => 'Desde',
'before_placeholder' => 'Hasta'
],
'numbers' => [
'all' => 'todos',
'filter_button_text' => 'Filtrar',
'reset_button_text' => 'Restablecer',
'min_placeholder' => 'Mínimo',
'max_placeholder' => 'Máximo',
'number_placeholder' => 'Número'
],
],
'eventlog' => [
'show_stacktrace' => 'Mostrar el seguimiento de la pila',
'hide_stacktrace' => 'Ocultar el seguimiento de la pila',
@ -84,7 +91,7 @@ return [
'title' => 'Seleccione el editor de código fuente a usar',
'description' => 'Su entorno de sistema operativo debe estar configurado para escuchar a uno de estos esquemas de URL.',
'openWith' => 'Abrir con',
'rememberChoice' => 'Recuerde que la opción seleccionada para esta sesión del navegador',
'rememberChoice' => 'Recuerde la opción seleccionada para esta sesión del navegador',
'open' => 'Abrir',
'cancel' => 'Cancelar'
]