uncheckedconversions

package
v0.0.0-...-f115076 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package uncheckedconversions provides functions to create values of package safesql types from plain strings. Uses of these functions could potentially result in instances of safesql types that violate their type contracts, and hence result in security vulnerabilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TrustedSQLStringFromStringKnownToSatisfyTypeContract

func TrustedSQLStringFromStringKnownToSatisfyTypeContract(trusted string) safesql.TrustedSQLString

TrustedSQLStringFromStringKnownToSatisfyTypeContract promotes the given string to a trusted string. Only strings known to be under the programmer control and trusted strings should be passed to this function.

One example of correct use of this function would be to cast a query that was retrieved from a query storage to be used with the safesql package. If the query storage is under the programmer control and user input cannot be put into it then the string is known to satisfy the type contract.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL