Merging to release-5.8: [TT-12238] Javascript regex issue on OAS API (#7904)#7994
Open
probelabs[bot] wants to merge 7 commits intorelease-5.8from
Open
Conversation
Cherry-pick failed with conflicts and requires manual resolution.
This empty commit exists to allow opening a draft PR.
7 tasks
Contributor
|
Failed to generate code suggestions for PR |
Contributor
|
Failed to generate code suggestions for PR |
Contributor
|
API Changes --- prev.txt 2026-04-17 08:04:25.462424155 +0000
+++ current.txt 2026-04-17 08:04:20.745475696 +0000
@@ -12196,13 +12196,6 @@
the version definition and ensures that required fields have appropriate
values.
-func RestoreUnicodeEscapesInError(err error) error
- RestoreUnicodeEscapesInError takes an error and applies the
- RestoreUnicodeEscapesInRegexp transformation to its message. For example,
- it converts RE2-compatible escapes like `\x{0041}` back to `\u0041`. It
- returns a new error with the transformed message. If the input error is nil,
- it returns nil.
-
func SetAsDefault(versionName string) option.Option[apidef.VersionDefinition]
SetAsDefault creates an option that marks a specific version as the default.
This sets the Default field in the VersionDefinition to the specified
@@ -12219,35 +12212,6 @@
TYPES
-type DataBytesModifier struct {
- // Has unexported fields.
-}
-
-func NewDataBytesModifier(data []byte) *DataBytesModifier
-
-func (d *DataBytesModifier) Data(data []byte)
-
-func (d *DataBytesModifier) Reset()
-
-func (d *DataBytesModifier) RestoreUnicodeEscapesFromRE2()
- RestoreUnicodeEscapesFromRE2 translates RE2-compatible hexadecimal escape
- sequences (`\x{XXXX}`) back to their original ECMA-262 compliant Unicode
- escape sequence representation (`\uXXXX`). This function is typically used
- when exporting an API definition or any other data structure where regex
- patterns were previously sanitized for internal use with Go's RE2 engine.
- It ensures that external consumers of the data receive the regex patterns in
- their original, more widely supported format.
-
-func (d *DataBytesModifier) Result() []byte
-
-func (d *DataBytesModifier) TransformUnicodeEscapesToRE2()
- TransformUnicodeEscapesToRE2 transforms ECMA-262 compliant Unicode escape
- sequences (`\uXXXX`) into a format that is compatible with Go's RE2 regex
- engine (`\x{XXXX}`). This is necessary because RE2 does not support the `\u`
- escape sequence but does support hexadecimal escapes, which can represent
- any Unicode code point. The function returns a new byte array with the
- transformed pattern.
-
type VersionParameter int
VersionParameter represents the type of parameter used in API version
configuration. It defines the possible parameters that can be used when
@@ -12469,6 +12433,36 @@
// Has unexported fields.
}
+# Package: ./pkg/schema
+
+package schema // import "github.com/TykTechnologies/tyk/pkg/schema"
+
+
+FUNCTIONS
+
+func RestoreUnicodeEscapesFromRE2(str string) string
+func RestoreUnicodeEscapesFromRE2Manipulation(schema *openapi3.Schema)
+func RestoreUnicodeEscapesInError(err error) error
+func TransformUnicodeEscapesToRE2Manipulation(schema *openapi3.Schema)
+
+TYPES
+
+type Manipulation func(schema *openapi3.Schema)
+
+type Manipulations []Manipulation
+
+type Visitor struct {
+ // Has unexported fields.
+}
+
+func NewVisitor() *Visitor
+
+func (v *Visitor) AddSchemaManipulation(manipulation Manipulation)
+
+func (v *Visitor) ProcessOAS(doc *oas.OAS)
+
+func (v *Visitor) ProcessSchema(schemaRef *openapi3.SchemaRef)
+
# Package: ./regexp
package regexp // import "github.com/TykTechnologies/tyk/regexp" |
…b28cb1ec042851db4d428/TT-12238
Contributor
|
Failed to generate code suggestions for PR |
Contributor
|
Failed to generate code suggestions for PR |
…b28cb1ec042851db4d428/TT-12238
Contributor
|
Failed to generate code suggestions for PR |
Contributor
|
Failed to generate code suggestions for PR |
…b28cb1ec042851db4d428/TT-12238
…b28cb1ec042851db4d428/TT-12238 # Conflicts: # gateway/mw_oas_validate_request.go
Contributor
🚨 Jira Linter FailedCommit: The Jira linter failed to validate your PR. Please check the error details below: 🔍 Click to view error detailsNext Steps
This comment will be automatically deleted once the linter passes. |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Cherry-pick of
ab9e5e1283983175494b28cb1ec042851db4d428frommastertorelease-5.8requires manual resolution.Conflicts detected: 3
Tips:
git cherry-pick -x ab9e5e1283983175494b28cb1ec042851db4d428Original commit: ab9e5e1