Commit Graph

15 Commits

Author SHA1 Message Date
amaitland 3475c7ef14 Core - FolderSchemeHandlerFactory improve path check to prevent break out
- Prevent accessing resources outside of the root path specified.
- Add Test to verify
2026-05-23 15:38:49 +10:00
Jan Bohunovský f684da355f FolderSchemeHandlerFactory - Remove UrlDecode from rootFolder (#5052) 2025-02-21 19:41:38 +10:00
Gavin Lambert b92e4e3eb7 Fix FolderSchemeHandlerFactory locking files (#4119) 2022-08-09 10:40:08 +10:00
Alex Maitland 8a367fbdc4 Refactor CefSharp.Core into CefSharp.Core.Runtime (#3311)
* Net Core - Rename CefSharp.Core.dll to CefSharp.Core.Runtime.dll

Partial rename, only Net Core, folder not renamed

* Net Core - Rename CefSharp.Core.RefAssembly to CefSharp.Core.netcore

Remove GenApi

* Core - Rename CefDragDataWrapper to DragData

Move into CefSharp.Core namespace

* WinForms/WPF/OffScreen - Migrate from GitLink command line to Nuget package

* Net Core - Refactor to have CefSharp.Core.dll contain only public Api

* Net Core - Remove CefSharp.Core.RefAssembly

* Net Core - Change CefSharp.Core.netcore output folder

* Net Core - Restructure nuget packages

* Net Core - Add Cefsharp.Core.Runtime.RefAssembly

* Net Core - Hide CLI/C++ classes from intellisense

Make sure users don't attempt to load them directly

* Rename CefSharp.Core to CefSharp.Core.Runtime

* Core - Restructure Net 4.5.2 packages to use CefSharp.Core.dll anycpu variant

Attempt to load CefSharp.Core.Runtime at runtime rather than having to use msbuild to copy the correct version

* Rename CefSharp.Core.netcore to CefSharp.Core

* WPF/WinForms/OffScreen - Change from x86/64 to AnyCPU

As they are all managed assemblies they can target AnyCPU.
Includes CefSharp.dll

* Convert RequestContextBuilder from C++ to C#

Now part of the CefSharp.Core PublicApi

* Update version number to 87.1.11

* Migrate more of the public Api to C#

* Net Core - Basic restructure complete

* Net Core - ModuleInitializer (Doesn't work yet)

* Remove direct references to BrowserSettings

* Net Core - ModuleInitializer load CefShar.Core.Runtime.dl

* Net Core - Load libcef.dll via CLR Module initializer

If no RID is specified then we can load libcef.dll using the module initializer

* Add version to CefSharp.Core

* Remove dependency on CefSharp.Core.Runtime
Rewrite common targets

* AnyCPU app.config transform

Improve AnyCPU support

* Improve Net Core 3 support
Only delete CefSharp.Core.Runtime.dll when AnyCPU

* Nuget - Add CefSharp.Core.Runtime reference when TargetFramework = NetCore

* Fix Typos

Based on #3306

* Net Core - Rename CefSharp.Core.Runtime RefAssembly source file

* Net Full - Generate CefSharp.Core.Runtime Ref Assembly

For now the powershell build script generates the .cs file based on a x86 release build.ps1
It's not possible to directly install GenApi as it requires a Sdk style project

* Net Core - Old packages copy files to required folders

* Test - Install newer .Net Compiler and set Lang Version to 7.3

* Net Core - Exclude Net 452 Runtime generated reference source

* Core - Add Refactoring TODO

* Ref Assembly - Generate source as part of build

- Move ref assembly source generate into GenerateRefAssemblySource.ps1
- Call before project build

Runs locally, see if Appveyor has a problem with the powershell script execution

* Core - Add more factory methods to create instances of managed wrappers

* Net Core - Make Initialzier properties internal

Not quite sure what the public API should look like as yet, so making internal for now.
2020-12-16 10:47:34 +10:00
amaitland b888c41fb7 Revert "Core - Remove ResourceHandler.GetMimeType"
This reverts commit 1b5e82814d4e49ab3b0ab249ad85c6254515a459.
2020-05-15 20:26:43 +10:00
amaitland 5cdc1f747e Core - Remove ResourceHandler.GetMimeType
It's actually made private for now as it's used in one place and
will be removed when that obsolete method is removed.

Resolves #3105
2020-05-15 20:26:42 +10:00
amaitland 0592d69784 Core - FolderSchemeHandlerFactory add protected virtual Create method
override Create to implement custom behaviour
2020-04-05 05:33:22 +10:00
amaitland 2b47cf56ce Core - Make ResourceHandler.GetMimeType obsolete
Instead use Cef.GetMimeType to use the Chromium MimeType Mappings

Rather than maintain our own mapping (which is out of date) we'll defer to Chromium.

Make ResourceHandler.FromString(string, string) and ResourceHandler.GetMimeType obsolete, they will be removed at some point
ResourceHandler.FromString uses ResourceHandler.GetMimeType internally, Replacing with ResourceHandler.FromString(resource, mimeType: Cef.GetMimeType(extension));
uses a different overload.

Issue #3041
2020-03-26 08:50:08 +10:00
Igor e81eb2e217 FolderSchemeHandlerFactory - change resource file share mode. (#2535)
* FolderSchemeHandlerFactory - change resource file share mode to ReadWrite.

* FolderSchemeHandlerFactory - add FileShare to controller parameters; make fields readonly.
2018-10-13 12:10:38 +10:00
Chris bef5dd37c4 Maintenance - Fixed formatting, file encoding, and copyright year (#2504)
* Applied formatting

* Fixed file encoding + Updated copyright year

* Updated License

* Fixed more file encoding

* Copyright notice now shows the year the file was created
2018-09-10 10:41:13 +10:00
James Coyle 4c555d7223 Handle URL escaped paths correctly (#2364)
Allows for the FolderSchemeHandler to correctly parse encoded URLs such as URLs containing spaces in requests from the currently loaded page.
2018-04-19 14:20:54 +10:00
amaitland 13c9c9c491 FolderSchemeHandlerFactory - Change to using File.Read and ResourceHandler.FromStream
Previously used ResourceHandler.FromFilePath which relies on the native CefStreamReader::CreateForFile that implementation had problems with multiple requests to the same file (file locking)

Resolves #2041
2017-06-02 11:31:04 +10:00
amaitland 6691d0080a Refactor ResourceHandler, split FileResourceHandler out into it's own class, rather than relaying on ResourceHandlerType - this allows us to add more underlying CEF type wrappers without a huge amount of effort now.
Add new ByteArrayResourceHandler - uses CefStreamReader::CreateForData to load the byte array, for use with CefStreamResourceHandler
Add ResourceHandler.FromByteArray method for ease of use
Change ResourceHandler.FromString to use the new ByteArrayResourceHandler class
2017-05-05 12:55:44 +10:00
Chris cd934267c6 Updated copyright year and made sure it used same format everywhere (#1966) 2017-03-06 08:44:37 +10:00
amaitland ca2085ef05 Add FolderSchemeHandlerFactory - maps request urls to files on disk within a specified folder.
Resolve #1717
2016-06-22 12:23:50 +10:00