Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
feat: Support non-https cookies #350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Uh oh!
There was an error while loading. Please reload this page.
feat: Support non-https cookies #350
Changes from all commits
c3f39b89729156File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: OpenShock/API
Length of output: 151
🏁 Script executed:
Repository: OpenShock/API
Length of output: 19127
🏁 Script executed:
Repository: OpenShock/API
Length of output: 15810
🏁 Script executed:
Repository: OpenShock/API
Length of output: 39229
🏁 Script executed:
Repository: OpenShock/API
Length of output: 359
🌐 Web query:
Microsoft .NET UriTypeConverter relative or absolute URI ConfigurationBinder GetValue Uri documentation💡 Result:
The.NET ConfigurationBinder.GetValue method supports binding to System.Uri properties by utilizing the TypeConverter mechanism [1][2]. When you use ConfigurationBinder to retrieve a configuration value as a Uri, the system internally employs UriTypeConverter to convert the configuration's string value into a Uri instance [3][2]. Regarding the handling of relative versus absolute URIs: 1. UriTypeConverter Behavior: The UriTypeConverter is responsible for string-to-Uri conversion [3]. While it generally handles standard URI strings well, its ability to distinguish or enforce URI types (relative vs. absolute) is governed by the underlying System.Uri class logic [4][5]. 2. Limitations with Relative URIs: In historical.NET versions, there have been identified gaps where UriTypeConverter did not consistently handle certain relative URI scenarios during conversion [6]. If your configuration contains a relative URI, ensure that the application logic consuming the resulting Uri instance is prepared to handle it (e.g., by resolving it against a base URI if necessary), as the Uri class itself distinguishes between relative and absolute instances based on its constructor or static factory methods (e.g., TryCreate) [4][5]. 3. ConfigurationBinder Mechanism: ConfigurationBinder does not natively provide a way to specify UriKind (Absolute vs. Relative) during the GetValue call [7][8]. It performs a standard type conversion [1]. If you require specific enforcement (e.g., ensuring a configuration value is an absolute URI), you should retrieve the value as a string first, validate it using Uri.TryCreate with the desired UriKind, and then instantiate the Uri object [4][5]. In summary, while ConfigurationBinder automatically converts configuration strings to Uri objects using UriTypeConverter, it does not offer built-in configuration settings to mandate that a URI must be absolute or relative [1][2]. For critical applications requiring strict URI validation, manual parsing using Uri.TryCreate is recommended [4].
Citations:
Validate
BaseUrlas an absolute HTTP(S) URI.RegisterFrontendOptionsdoes not enforceIsAbsoluteUrior anhttp/httpsscheme.CookieSecurereturnsfalsefor every other scheme, so an invalid production configuration can emit authentication cookies withoutSecure.🤖 Prompt for AI Agents
Uh oh!
There was an error while loading. Please reload this page.