From 002b2661649d2d85431ebf2e8d2c455193a7f174 Mon Sep 17 00:00:00 2001 From: Carlos Rodriguez Date: Fri, 27 Jan 2023 10:29:55 +0100 Subject: [PATCH] fix: allow value with slashes in URL template (#3045) --- modules/apps/transfer/types/query.pb.go | 92 +++++++++---------- modules/apps/transfer/types/query.pb.gw.go | 4 +- .../ibc/applications/transfer/v1/query.proto | 4 +- 3 files changed, 50 insertions(+), 50 deletions(-) diff --git a/modules/apps/transfer/types/query.pb.go b/modules/apps/transfer/types/query.pb.go index 95734564362..f8c4543eee3 100644 --- a/modules/apps/transfer/types/query.pb.go +++ b/modules/apps/transfer/types/query.pb.go @@ -523,52 +523,52 @@ func init() { } var fileDescriptor_a638e2800a01538c = []byte{ - // 715 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xcd, 0x6e, 0xd3, 0x4c, - 0x14, 0x8d, 0xfb, 0x7d, 0x0d, 0xca, 0x0d, 0xed, 0x62, 0x28, 0xb4, 0x58, 0xc5, 0xad, 0xac, 0x02, - 0xa5, 0x3f, 0x1e, 0xd2, 0x16, 0xca, 0x82, 0x0d, 0xe5, 0xb7, 0x88, 0x45, 0x9b, 0xb2, 0x82, 0x45, - 0x35, 0xb6, 0x07, 0xc7, 0x52, 0xe2, 0x71, 0x3d, 0x4e, 0x50, 0x55, 0x65, 0xc3, 0x13, 0x20, 0xf5, - 0x25, 0x50, 0xc5, 0x43, 0xb0, 0xec, 0xb2, 0x12, 0x12, 0x62, 0x05, 0xa8, 0xe5, 0x35, 0x90, 0x90, - 0x67, 0x26, 0x89, 0x4d, 0xa3, 0x34, 0xde, 0x8d, 0x67, 0xee, 0xb9, 0xf7, 0x9c, 0x73, 0xef, 0x95, - 0x61, 0xde, 0xb7, 0x1d, 0x4c, 0xc2, 0xb0, 0xee, 0x3b, 0x24, 0xf6, 0x59, 0xc0, 0x71, 0x1c, 0x91, - 0x80, 0xbf, 0xa3, 0x11, 0x6e, 0x55, 0xf0, 0x5e, 0x93, 0x46, 0xfb, 0x56, 0x18, 0xb1, 0x98, 0xa1, - 0x69, 0xdf, 0x76, 0xac, 0x74, 0xa4, 0xd5, 0x89, 0xb4, 0x5a, 0x15, 0x7d, 0xc2, 0x63, 0x1e, 0x13, - 0x81, 0x38, 0x39, 0x49, 0x8c, 0xbe, 0xe0, 0x30, 0xde, 0x60, 0x1c, 0xdb, 0x84, 0x53, 0x99, 0x0c, - 0xb7, 0x2a, 0x36, 0x8d, 0x49, 0x05, 0x87, 0xc4, 0xf3, 0x03, 0x91, 0x48, 0xc5, 0x2e, 0x0e, 0x64, - 0xd2, 0xad, 0x25, 0x83, 0xa7, 0x3d, 0xc6, 0xbc, 0x3a, 0xc5, 0x24, 0xf4, 0x31, 0x09, 0x02, 0x16, - 0x2b, 0x4a, 0xe2, 0xd5, 0x5c, 0x82, 0x6b, 0xdb, 0x49, 0xb1, 0x27, 0x34, 0x60, 0x8d, 0xd7, 0x11, - 0x71, 0x68, 0x95, 0xee, 0x35, 0x29, 0x8f, 0x11, 0x82, 0xff, 0x6b, 0x84, 0xd7, 0xa6, 0xb4, 0x59, - 0x6d, 0xbe, 0x54, 0x15, 0x67, 0xd3, 0x85, 0xc9, 0x73, 0xd1, 0x3c, 0x64, 0x01, 0xa7, 0x68, 0x13, - 0xca, 0x6e, 0x72, 0xbb, 0x1b, 0x27, 0xd7, 0x02, 0x55, 0x5e, 0x99, 0xb7, 0x06, 0x39, 0x61, 0xa5, - 0xd2, 0x80, 0xdb, 0x3d, 0x9b, 0xe4, 0x5c, 0x15, 0xde, 0x21, 0xf5, 0x0c, 0xa0, 0xe7, 0x86, 0x2a, - 0x72, 0xcb, 0x92, 0xd6, 0x59, 0x89, 0x75, 0x96, 0xec, 0x83, 0xb2, 0xce, 0xda, 0x22, 0x5e, 0x47, - 0x50, 0x35, 0x85, 0x34, 0xbf, 0x68, 0x30, 0x75, 0xbe, 0x86, 0x92, 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33, 0x0a, 0x6f, 0xd6, 0x3d, 0x3f, 0xae, 0x35, 0x6d, 0xcb, - 0x61, 0x0d, 0xac, 0xfe, 0x9b, 0xbe, 0xed, 0x2c, 0x7b, 0x0c, 0xb7, 0xd6, 0x71, 0x83, 0xb9, 0xcd, - 0x3a, 0xe5, 0xff, 0x90, 0x88, 0xf7, 0x43, 0xca, 0xed, 0xa2, 0xf8, 0xeb, 0xad, 0xfe, 0x0d, 0x00, - 0x00, 0xff, 0xff, 0x8d, 0xed, 0x11, 0x8c, 0xcc, 0x07, 0x00, 0x00, + // 718 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x4f, 0x4f, 0xd4, 0x40, + 0x14, 0xdf, 0xa2, 0x2c, 0xd9, 0xb7, 0xc2, 0x61, 0x44, 0xc1, 0x06, 0x0b, 0x69, 0x50, 0xc9, 0x0a, + 0x1d, 0x97, 0x3f, 0xe2, 0x41, 0x0f, 0xe2, 0x5f, 0x8c, 0x07, 0x58, 0x3c, 0xe9, 0x81, 0x4c, 0xdb, + 0xb1, 0xdb, 0x64, 0xb7, 0x53, 0x3a, 0xdd, 0x35, 0x84, 0x70, 0xd1, 0x2f, 0x60, 0xc2, 0x97, 0x30, + 0x26, 0xc6, 0xaf, 0xe0, 0x91, 0x23, 0x89, 0x89, 0xf1, 0xa4, 0x06, 0xfc, 0x20, 0xa6, 0x33, 0xb3, + 0xbb, 0xad, 0x6c, 0x16, 0x7a, 0x9b, 0xce, 0xbc, 0xdf, 0x7b, 0xbf, 0xdf, 0xef, 0xbd, 0x97, 0xc2, + 0x9c, 0x6f, 0x3b, 0x98, 0x84, 0x61, 0xc3, 0x77, 0x48, 0xec, 0xb3, 0x80, 0xe3, 0x38, 0x22, 0x01, + 0x7f, 0x4b, 0x23, 0xdc, 0xae, 0xe2, 0x9d, 0x16, 0x8d, 0x76, 0xad, 0x30, 0x62, 0x31, 0x43, 0x53, + 0xbe, 0xed, 0x58, 0xe9, 0x48, 0xab, 0x13, 0x69, 0xb5, 0xab, 0xfa, 0xb8, 0xc7, 0x3c, 0x26, 0x02, + 0x71, 0x72, 0x92, 0x18, 0xbd, 0xe2, 0x30, 0xde, 0x64, 0x1c, 0xdb, 0x84, 0x53, 0x99, 0x0c, 0xb7, + 0xab, 0x36, 0x8d, 0x49, 0x15, 0x87, 0xc4, 0xf3, 0x03, 0x91, 0x48, 0xc5, 0xde, 0x1e, 0xc8, 0xa4, + 0x5b, 0x4b, 0x06, 0x4f, 0x79, 0x8c, 0x79, 0x0d, 0x8a, 0x49, 0xe8, 0x63, 0x12, 0x04, 0x2c, 0x56, + 0x94, 0xc4, 0xab, 0x39, 0x0f, 0x57, 0x37, 0x93, 0x62, 0x8f, 0x69, 0xc0, 0x9a, 0xaf, 0x22, 0xe2, + 0xd0, 0x1a, 0xdd, 0x69, 0x51, 0x1e, 0x23, 0x04, 0x17, 0xeb, 0x84, 0xd7, 0x27, 0xb5, 0x19, 0x6d, + 0xae, 0x54, 0x13, 0x67, 0xd3, 0x85, 0x89, 0x53, 0xd1, 0x3c, 0x64, 0x01, 0xa7, 0x68, 0x1d, 0xca, + 0x6e, 0x72, 0xbb, 0x1d, 0x27, 0xd7, 0x02, 0x55, 0x5e, 0x9c, 0xb3, 0x06, 0x39, 0x61, 0xa5, 0xd2, + 0x80, 0xdb, 0x3d, 0x9b, 0xe4, 0x54, 0x15, 0xde, 0x21, 0xf5, 0x14, 0xa0, 0xe7, 0x86, 0x2a, 0x72, + 0xd3, 0x92, 0xd6, 0x59, 0x89, 0x75, 0x96, 0xec, 0x83, 0xb2, 0xce, 0xda, 0x20, 0x5e, 0x47, 0x50, + 0x2d, 0x85, 0x34, 0xbf, 0x69, 0x30, 0x79, 0xba, 0x86, 0x92, 0xf2, 0x06, 0x2e, 0xa5, 0xa4, 0xf0, + 0x49, 0x6d, 0xe6, 0x42, 0x1e, 0x2d, 0x6b, 0x63, 0x87,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, 0xf5, 0xf7, 0xf4, 0x6d, 0x67, 0xc1, 0x63, 0xb8, 0xbd, 0x8a, 0x9b, + 0xcc, 0x6d, 0x35, 0x28, 0xff, 0x8f, 0x44, 0xbc, 0x1b, 0x52, 0x6e, 0x17, 0xc5, 0xbf, 0x6f, 0xe9, + 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x47, 0x7a, 0xbb, 0x0b, 0xd2, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/modules/apps/transfer/types/query.pb.gw.go b/modules/apps/transfer/types/query.pb.gw.go index d0c0e4db5c3..35d95239e65 100644 --- a/modules/apps/transfer/types/query.pb.gw.go +++ b/modules/apps/transfer/types/query.pb.gw.go @@ -537,13 +537,13 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_DenomTrace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"ibc", "apps", "transfer", "v1", "denom_traces", "hash"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_DenomTrace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 3, 0, 4, 1, 5, 5}, []string{"ibc", "apps", "transfer", "v1", "denom_traces", "hash"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_DenomTraces_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"ibc", "apps", "transfer", "v1", "denom_traces"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"ibc", "apps", "transfer", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_DenomHash_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"ibc", "apps", "transfer", "v1", "denom_hashes", "trace"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_DenomHash_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 3, 0, 4, 1, 5, 5}, []string{"ibc", "apps", "transfer", "v1", "denom_hashes", "trace"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_EscrowAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 2, 6, 1, 0, 4, 1, 5, 7, 2, 8}, []string{"ibc", "apps", "transfer", "v1", "channels", "channel_id", "ports", "port_id", "escrow_address"}, "", runtime.AssumeColonVerbOpt(false))) ) diff --git a/proto/ibc/applications/transfer/v1/query.proto b/proto/ibc/applications/transfer/v1/query.proto index c732b830e84..89b70309f15 100644 --- a/proto/ibc/applications/transfer/v1/query.proto +++ b/proto/ibc/applications/transfer/v1/query.proto @@ -13,7 +13,7 @@ option go_package = "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types"; service Query { // DenomTrace queries a denomination trace information. rpc DenomTrace(QueryDenomTraceRequest) returns (QueryDenomTraceResponse) { - option (google.api.http).get = "/ibc/apps/transfer/v1/denom_traces/{hash}"; + option (google.api.http).get = "/ibc/apps/transfer/v1/denom_traces/{hash=**}"; } // DenomTraces queries all denomination traces. @@ -28,7 +28,7 @@ service Query { // DenomHash queries a denomination hash information. rpc DenomHash(QueryDenomHashRequest) returns (QueryDenomHashResponse) { - option (google.api.http).get = "/ibc/apps/transfer/v1/denom_hashes/{trace}"; + option (google.api.http).get = "/ibc/apps/transfer/v1/denom_hashes/{trace=**}"; } // EscrowAddress returns the escrow address for a particular port and channel id.