diff --git a/swad_changelog.h b/swad_changelog.h index 50d34c318..d047bf977 100644 --- a/swad_changelog.h +++ b/swad_changelog.h @@ -355,10 +355,11 @@ En OpenSWAD: ps2pdf source.ps destination.pdf */ -#define Log_PLATFORM_VERSION "SWAD 18.13.6 (2018-11-09)" +#define Log_PLATFORM_VERSION "SWAD 18.13.7 (2018-11-09)" #define CSS_FILE "swad18.4.css" #define JS_FILE "swad17.17.1.js" /* + Version 18.13.7: Nov 09, 2018 Fixed bug in file browser links. (236552 lines) Version 18.13.6: Nov 09, 2018 Fixed bug in file browser links, reported by Alberto Prieto Espinosa. (236549 lines) Version 18.13.5: Nov 08, 2018 New file extension allowed, requested by Javier Fernández Baldomero: .gdb (GNU Debugger Script). (236540 lines) Copy the following icons to icon public directory: diff --git a/swad_file_browser.c b/swad_file_browser.c index d1243981c..4bf8fd77c 100644 --- a/swad_file_browser.c +++ b/swad_file_browser.c @@ -2645,7 +2645,7 @@ static void Brw_GetParamsPathInTreeAndFileName (void) Par_GetParToText ("Path",Gbl.FileBrowser.Priv.PathInTreeUntilFilFolLnk,PATH_MAX); /* Check if path contains ".." */ - if (strstr (Gbl.FileBrowser.Priv.PathInTreeUntilFilFolLnk,"..")) // ".." is not allowed in the path + if (strstr (Gbl.FileBrowser.Priv.PathInTreeUntilFilFolLnk,"..")) // ".." is not allowed in path Lay_ShowErrorAndExit ("Wrong path."); /***** Get the name of the file, folder or link *****/ @@ -2658,13 +2658,14 @@ static void Brw_GetParamsPathInTreeAndFileName (void) Gbl.FileBrowser.FilFolLnkName, NAME_MAX,Str_TO_TEXT,false)) { + Gbl.FileBrowser.FileType = FileType; + /* Check if filename contains ".." */ - Brw_GetFileNameToShow (FileType, + Brw_GetFileNameToShow (Gbl.FileBrowser.FileType, Gbl.FileBrowser.FilFolLnkName, FileNameToShow); - if (strstr (FileNameToShow,"..")) // ".." is not allowed in the path - Lay_ShowErrorAndExit ("Wrong path."); - Gbl.FileBrowser.FileType = FileType; + if (strstr (FileNameToShow,"..")) // ".." is not allowed in filename + Lay_ShowErrorAndExit ("Wrong file name."); break; } @@ -9855,6 +9856,8 @@ void Brw_RecLinkFileBrowser (void) } } } + else // Link URL not valid + Ale_ShowAlert (Ale_WARNING,Txt_UPLOAD_FILE_Invalid_link); } else // Link URL not valid Ale_ShowAlert (Ale_WARNING,Txt_UPLOAD_FILE_Invalid_link);