code
stringlengths
12
2.05k
label_name
stringlengths
6
8
label
int64
0
95
func TestReadWriteCompactProtocol(t *testing.T) { ReadWriteProtocolTest(t, NewCompactProtocolFactory()) // CompactProtocol is capable of reading and writing in different goroutines. ReadWriteProtocolParallelTest(t, NewCompactProtocolFactory()) transports := []Transport{ NewMemoryBuffer(), NewStreamTransportRW(b...
CWE-770
37
func (x *ListPurchasesRequest) ProtoReflect() protoreflect.Message { mi := &file_console_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) }
CWE-613
7
func newMockResourceServer(t testing.TB) ResourceServer { ctx := context.Background() dummy := "" serverURL := &dummy hf := func(w http.ResponseWriter, r *http.Request) { if r.URL.Path == "/.well-known/oauth-authorization-server" { w.Header().Set("Content-Type", "application/json") _, err := io.WriteString(...
CWE-613
7
func (x *UpdateGroupUserStateRequest) ProtoReflect() protoreflect.Message { mi := &file_console_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) ...
CWE-613
7
func(ctx etreeutils.NSContext, signedInfo *etree.Element) error { detachedSignedInfo, err := etreeutils.NSDetatch(ctx, signedInfo) if err != nil { return err } c14NMethod, err := etreeutils.NSFindOneChildCtx(ctx, detachedSignedInfo, Namespace, CanonicalizationMethodTag) if err != nil { ...
CWE-347
25
func UnpackXzTar(filename string, destination string, verbosityLevel int) (err error) { Verbose = verbosityLevel if !common.FileExists(filename) { return fmt.Errorf("file %s not found", filename) } if !common.DirExists(destination) { return fmt.Errorf("directory %s not found", destination) } filename, err = c...
CWE-59
36
func (db *DB) Verify(s *data.Signed, role string, minVersion int64) error { err := db.VerifyIgnoreExpiredCheck(s, role, minVersion) if err != nil { return err } sm := &signedMeta{} if err := json.Unmarshal(s.Signed, sm); err != nil { return err } if IsExpired(sm.Expires) { return ErrExpired{sm.Expires}...
CWE-354
82
func ZeroTierLeaveNetwork(c *gin.Context) { networkId := c.Param("id") service.MyService.ZeroTier().ZeroTierLeaveNetwork(networkId) if len(networkId) == 0 { c.JSON(http.StatusOK, model.Result{Success: oasis_err2.INVALID_PARAMS, Message: oasis_err2.GetMsg(oasis_err2.INVALID_PARAMS)}) return } c.JSON(http.Status...
CWE-78
6
func NewLocalSessionCache(config Config) SessionCache { ctx, ctxCancelFn := context.WithCancel(context.Background()) s := &LocalSessionCache{ config: config, ctx: ctx, ctxCancelFn: ctxCancelFn, cache: make(map[uuid.UUID]*sessionCacheUser), } go func() { ticker := time.NewTicker(2 * time.Durati...
CWE-613
7
func ZeroTierJoinNetwork(c *gin.Context) { networkId := c.Param("id") service.MyService.ZeroTier().ZeroTierJoinNetwork(networkId) if len(networkId) == 0 { c.JSON(http.StatusOK, model.Result{Success: oasis_err2.INVALID_PARAMS, Message: oasis_err2.GetMsg(oasis_err2.INVALID_PARAMS)}) return } c.JSON(http.StatusOK...
CWE-78
6
func SnapshotFileMetaEqual(actual data.SnapshotFileMeta, expected data.SnapshotFileMeta) error { // TUF-1.0 no longer considers the length and hashes to be a required // member of snapshots. However they are considering requiring hashes // for delegated roles to avoid an attack described in Section 5.6 of // the Me...
CWE-354
82
func (*StorageCollectionsList) Descriptor() ([]byte, []int) { return file_console_proto_rawDescGZIP(), []int{34} }
CWE-613
7
func (s *ConsoleServer) Authenticate(ctx context.Context, in *console.AuthenticateRequest) (*console.ConsoleSession, error) { role := console.UserRole_USER_ROLE_UNKNOWN var uname string var email string switch in.Username { case s.config.GetConsole().Username: if in.Password == s.config.GetConsole().Password { ...
CWE-613
7
func padBuffer(buffer []byte, blockSize int) []byte { missing := blockSize - (len(buffer) % blockSize) ret, out := resize(buffer, len(buffer)+missing) padding := bytes.Repeat([]byte{byte(missing)}, missing) copy(out, padding) return ret }
CWE-190
19
func (x *WalletLedger) ProtoReflect() protoreflect.Message { mi := &file_console_proto_msgTypes[42] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) }
CWE-613
7
func (x *RuntimeInfo) ProtoReflect() protoreflect.Message { mi := &file_console_proto_msgTypes[41] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) }
CWE-613
7
func (x *ConsoleSession) ProtoReflect() protoreflect.Message { mi := &file_console_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) }
CWE-613
7
func (p *CompactProtocol) ReadString() (value string, err error) { length, e := p.readVarint32() if e != nil { return "", NewProtocolException(e) } if length < 0 { return "", invalidDataLength } if uint64(length) > p.trans.RemainingBytes() { return "", invalidDataLength } if length == 0 { return "", ni...
CWE-770
37
func NewFositeMemoryStore( r InternalRegistry, c Configuration, ) *FositeMemoryStore { return &FositeMemoryStore{ AuthorizeCodes: make(map[string]authorizeCode), IDSessions: make(map[string]fosite.Requester), AccessTokens: make(map[string]fosite.Requester), PKCES: make(map[string]fosite.Reques...
CWE-294
94
func MakeEmailPrimary(email *EmailAddress) error { has, err := x.Get(email) if err != nil { return err } else if !has { return errors.EmailNotFound{Email: email.Email} } if !email.IsActivated { return errors.EmailNotVerified{Email: email.Email} } user := &User{ID: email.UID} has, err = x.Get(user) if e...
CWE-281
93
func (x *DeleteGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_console_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) }
CWE-613
7
func (f MigrateRepo) ParseRemoteAddr(user *db.User) (string, error) { remoteAddr := strings.TrimSpace(f.CloneAddr) // Remote address can be HTTP/HTTPS/Git URL or local path. if strings.HasPrefix(remoteAddr, "http://") || strings.HasPrefix(remoteAddr, "https://") || strings.HasPrefix(remoteAddr, "git://") { u,...
CWE-918
16
func (*Leaderboard) Descriptor() ([]byte, []int) { return file_console_proto_rawDescGZIP(), []int{23} }
CWE-613
7
func isMatchingRedirectURI(uri string, haystack []string) bool { requested, err := url.Parse(uri) if err != nil { return false } for _, b := range haystack { if strings.ToLower(b) == strings.ToLower(uri) || isLoopbackURI(requested, b) { return true } } return false }
CWE-601
11
func (x *StorageCollectionsList) ProtoReflect() protoreflect.Message { mi := &file_console_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) }
CWE-613
7
func (d *partialArray) add(key string, val *lazyNode) error { if key == "-" { *d = append(*d, val) return nil } idx, err := strconv.Atoi(key) if err != nil { return err } ary := make([]*lazyNode, len(*d)+1) cur := *d if idx < 0 { idx *= -1 if idx > len(ary) { return fmt.Errorf("Unable to acces...
CWE-787
24
func (x *WriteStorageObjectRequest) ProtoReflect() protoreflect.Message { mi := &file_console_proto_msgTypes[44] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) }
CWE-613
7
func (*StatusList_Status) Descriptor() ([]byte, []int) { return file_console_proto_rawDescGZIP(), []int{40, 0} }
CWE-613
7
func PrintVerificationHeader(imgRef string, co *cosign.CheckOpts, bundleVerified bool) { fmt.Fprintf(os.Stderr, "\nVerification for %s --\n", imgRef) fmt.Fprintln(os.Stderr, "The following checks were performed on each of these signatures:") if co.ClaimVerifier != nil { if co.Annotations != nil { fmt.Fprintln(o...
CWE-295
52
func (*WalletLedger) Descriptor() ([]byte, []int) { return file_console_proto_rawDescGZIP(), []int{42} }
CWE-613
7
func (*UserList) Descriptor() ([]byte, []int) { return file_console_proto_rawDescGZIP(), []int{39} }
CWE-613
7
func cmdList(args *docopt.Args, client *tuf.Client) error { if _, err := client.Update(); err != nil && !tuf.IsLatestSnapshot(err) { return err } targets, err := client.Targets() if err != nil { return err } w := tabwriter.NewWriter(os.Stdout, 1, 2, 2, ' ', 0) defer w.Flush() fmt.Fprintln(w, "PATH\tSIZE") ...
CWE-354
82
func (p *HTTPClient) ReadByte() (c byte, err error) { return readByte(p.response.Body) }
CWE-770
37
func WithRelabeledContainerMounts(mountLabel string) oci.SpecOpts { return func(ctx context.Context, client oci.Client, _ *containers.Container, s *runtimespec.Spec) (err error) { if mountLabel == "" { return nil } for _, m := range s.Mounts { switch m.Destination { case etcHosts, etcHostname, resolvCon...
CWE-281
93
func TestIsLocalHostname(t *testing.T) { tests := []struct { hostname string allowlist []string want bool }{ {hostname: "localhost", want: true}, // #00 {hostname: "127.0.0.1", want: true}, // #01 {hostname: "::1", want: true}, // #02 {hostname: "0:0:0:0:0:0:0:1", want: tru...
CWE-918
16
func (x *CallApiEndpointRequest) Reset() { *x = CallApiEndpointRequest{} if protoimpl.UnsafeEnabled { mi := &file_console_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } }
CWE-613
7
func validateAndUpdateWebhook(c *context.Context, orCtx *orgRepoContext, w *db.Webhook) { c.Data["Webhook"] = w if c.HasError() { c.Success(orCtx.TmplNew) return } field, msg, ok := validateWebhook(c.User, c.Locale, w) if !ok { c.FormErr(field) c.RenderWithErr(msg, orCtx.TmplNew, nil) return } if er...
CWE-918
16
func (x *WriteStorageObjectRequest) Reset() { *x = WriteStorageObjectRequest{} if protoimpl.UnsafeEnabled { mi := &file_console_proto_msgTypes[44] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } }
CWE-613
7
func TestRedactURL(t *testing.T) { cases := []struct { name string url *url.URL want string }{ { name: "non-blank Password", url: &url.URL{ Scheme: "http", Host: "host.tld", Path: "this:that", User: url.UserPassword("user", "password"), }, want: "http://user:xxxxx@host.tld/t...
CWE-532
28
func (cs chunkState) String() string { stateString := "" switch cs { case readChunkHeader: stateString = "readChunkHeader" case readChunkTrailer: stateString = "readChunkTrailer" case readChunk: stateString = "readChunk" case verifyChunk: stateString = "verifyChunk" case eofChunk: stateString = "eofChu...
CWE-924
95
func compileRegexps(regexpStrings []string) ([]*regexp.Regexp, error) { regexps := []*regexp.Regexp{} for _, regexpStr := range regexpStrings { r, err := regexp.Compile(regexpStr) if err != nil { return regexps, err } regexps = append(regexps, r) } return regexps, nil }
CWE-639
9
func (ctx *cbcAEAD) Open(dst, nonce, ciphertext, data []byte) ([]byte, error) { if len(ciphertext) < ctx.authtagBytes { return nil, errors.New("square/go-jose: invalid ciphertext (too short)") } offset := len(ciphertext) - ctx.authtagBytes expectedTag := ctx.computeAuthTag(data, nonce, ciphertext[:offset]) matc...
CWE-190
19
func (x *CallApiEndpointResponse) Reset() { *x = CallApiEndpointResponse{} if protoimpl.UnsafeEnabled { mi := &file_console_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } }
CWE-613
7
func (voteSet *VoteSet) MakeCommit() *Commit { if voteSet.signedMsgType != tmproto.PrecommitType { panic("Cannot MakeCommit() unless VoteSet.Type is PrecommitType") } voteSet.mtx.Lock() defer voteSet.mtx.Unlock() // Make sure we have a 2/3 majority if voteSet.maj23 == nil { panic("Cannot MakeCommit() unless ...
CWE-347
25
func (x *GetWalletLedgerRequest) Reset() { *x = GetWalletLedgerRequest{} if protoimpl.UnsafeEnabled { mi := &file_console_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } }
CWE-613
7
func NewConcatKDF(hash crypto.Hash, z, algID, ptyUInfo, ptyVInfo, supPubInfo, supPrivInfo []byte) io.Reader { buffer := make([]byte, len(algID)+len(ptyUInfo)+len(ptyVInfo)+len(supPubInfo)+len(supPrivInfo)) n := 0 n += copy(buffer, algID) n += copy(buffer[n:], ptyUInfo) n += copy(buffer[n:], ptyVInfo) n += copy(bu...
CWE-190
19
func setCapabilities(spec *specs.Spec, keepCaps ...string) error { currentCaps, err := capability.NewPid2(0) if err != nil { return errors.Wrapf(err, "error reading capabilities of current process") } if err := currentCaps.Load(); err != nil { return errors.Wrapf(err, "error loading capabilities") } caps, err...
CWE-276
45
func readUvarint(r io.ByteReader) (x uint64, n int, err error) { var s uint i := 0 for { b, err := r.ReadByte() if err != nil { return x, i, err } i++ if b < 0x80 { if i > 10 || i == 10 && b > 1 { return x, i, errOverflowU64 } return x | uint64(b)<<s, i, nil } x |= uint64(b&0x7f) << s ...
CWE-835
42
func (*DeleteLeaderboardRecordRequest) Descriptor() ([]byte, []int) { return file_console_proto_rawDescGZIP(), []int{20} }
CWE-613
7
func SanitizePath(path string) string { return strings.TrimLeft(path, "./") }
CWE-22
2
func IsLatestSnapshot(err error) bool { _, ok := err.(ErrLatestSnapshot) return ok }
CWE-354
82
func (cf *clientsFactory) UpdateNamespaces(ctx context.Context) error { clients, err := clientsForClusters(cf.clusters.Get()) if err != nil { cf.log.Error(err, "failed to create clients for", "clusters", cf.clusters.Get()) return err } cf.syncCaches() wg := sync.WaitGroup{} for clusterName, c := range clie...
CWE-532
28
func (x *DeleteLeaderboardRecordRequest) ProtoReflect() protoreflect.Message { mi := &file_console_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(...
CWE-613
7
func (c CrossOriginResourceSharing) isOriginAllowed(origin string) bool { if len(origin) == 0 { return false } if len(c.AllowedDomains) == 0 { return true } allowed := false for _, domain := range c.AllowedDomains { if domain == origin { allowed = true break } } if !allowed { if len(c.allowedO...
CWE-639
9
func (*ConsoleSession) Descriptor() ([]byte, []int) { return file_console_proto_rawDescGZIP(), []int{15} }
CWE-613
7
func (*WriteStorageObjectRequest) Descriptor() ([]byte, []int) { return file_console_proto_rawDescGZIP(), []int{44} }
CWE-613
7
func (c *Client) Update() (data.TargetFiles, error) { if err := c.UpdateRoots(); err != nil { if _, ok := err.(verify.ErrExpired); ok { // For backward compatibility, we wrap the ErrExpired inside // ErrDecodeFailed. return nil, ErrDecodeFailed{"root.json", err} } return nil, err } // Get timestamp.j...
CWE-354
82
func prepareBindMount(m *configs.Mount, rootfs string) error { stat, err := os.Stat(m.Source) if err != nil { // error out if the source of a bind mount does not exist as we will be // unable to bind anything to it. return err } // ensure that the destination of the bind mount is resolved of symlinks at mount...
CWE-190
19
func (x *LeaderboardList) ProtoReflect() protoreflect.Message { mi := &file_console_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) }
CWE-613
7
func SearchRepositoryByName(opt SearchOption) (repos []*Repository, err error) { // Prevent SQL inject. opt.Keyword = FilterSQLInject(opt.Keyword) if len(opt.Keyword) == 0 { return repos, nil } opt.Keyword = strings.ToLower(opt.Keyword) repos = make([]*Repository, 0, opt.Limit) // Append conditions. sess :=...
CWE-89
0
func (*UnlinkDeviceRequest) Descriptor() ([]byte, []int) { return file_console_proto_rawDescGZIP(), []int{35} }
CWE-613
7
func canonicalMIMEHeaderKey(a []byte) string { upper := true for i, c := range a { // Canonicalize: first letter upper case // and upper case after each dash. // (Host, User-Agent, If-Modified-Since). // MIME headers are ASCII only, so no Unicode issues. if c == ' ' { c = '-' } else if upper && 'a' <= ...
CWE-444
41
func DeleteCode(id string) { delete(memory.Code, id) }
CWE-305
92
func (a *APIs) PostLogin(v *PostLoginReq) *kongchuanhujiao.Response { if v.Code != account.GetCode(v.ID) || v.Code == "" { // FIXME datahub 鉴权 return kongchuanhujiao.GenerateErrResp(1, "验证码有误") } now := time.Now() t, err := jwt.NewTokenWithClaims(jwt.SigningMethodES256, jwt.MapClaims{ "iss": config.GetJWTConf...
CWE-305
92
func consoleInterceptorFunc(logger *zap.Logger, config Config) func(context.Context, interface{}, *grpc.UnaryServerInfo, grpc.UnaryHandler) (interface{}, error) {
CWE-613
7
func (x *StatusList_Status) Reset() { *x = StatusList_Status{} if protoimpl.UnsafeEnabled { mi := &file_console_proto_msgTypes[49] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } }
CWE-613
7
func (x *MatchState) Reset() { *x = MatchState{} if protoimpl.UnsafeEnabled { mi := &file_console_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } }
CWE-613
7
func (*DeleteGroupRequest) Descriptor() ([]byte, []int) { return file_console_proto_rawDescGZIP(), []int{17} }
CWE-613
7
func GetIssues(uid, rid, pid, mid int64, page int, isClosed bool, labelIds, sortType string) ([]Issue, error) { sess := x.Limit(20, (page-1)*20) if rid > 0 { sess.Where("repo_id=?", rid).And("is_closed=?", isClosed) } else { sess.Where("is_closed=?", isClosed) } if uid > 0 { sess.And("assignee_id=?", uid) ...
CWE-89
0
func (*GetWalletLedgerRequest) Descriptor() ([]byte, []int) { return file_console_proto_rawDescGZIP(), []int{45} }
CWE-613
7
func (*CallApiEndpointResponse) Descriptor() ([]byte, []int) { return file_console_proto_rawDescGZIP(), []int{13} }
CWE-613
7
func (cr *s3ChunkedReader) readS3ChunkHeader() { // Read the first chunk line until CRLF. var hexChunkSize, hexChunkSignature []byte hexChunkSize, hexChunkSignature, cr.err = readChunkLine(cr.reader) if cr.err != nil { return } // <hex>;token=value - converts the hex into its uint64 form. cr.n, cr.err = parseH...
CWE-924
95
func isLoopbackURI(requested *url.URL, registeredURI string) bool { registered, err := url.Parse(registeredURI) if err != nil { return false } if registered.Scheme != "http" || !isLoopbackAddress(registered.Host) { return false } if requested.Scheme == "http" && isLoopbackAddress(requested.Host) && register...
CWE-178
40
func (*UserList_User) Descriptor() ([]byte, []int) { return file_console_proto_rawDescGZIP(), []int{39, 0} }
CWE-613
7
func (x *UpdateGroupRequest) ProtoReflect() protoreflect.Message { mi := &file_console_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) }
CWE-613
7
private HandshakeMessage createClientHandshakeMessage( HandshakeType type, byte[] buffer) { switch (type) { case HandshakeType.ClientHello: return new TlsClientHello(this.context, buffer); case HandshakeType.Certificate: return new TlsClientCertificate(this.context, buffer); case Ha...
CWE-295
52
return utils.WithProcfd(rootfs, m.Destination, func(procfd string) error { return mount(m.Source, m.Destination, procfd, m.Device, uintptr(m.Flags|unix.MS_REMOUNT), "") })
CWE-190
19
func (x *MatchState) ProtoReflect() protoreflect.Message { mi := &file_console_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) }
CWE-613
7
func RedactURL(u *url.URL) string { if u == nil { return "" } ru := *u if _, has := ru.User.Password(); has { ru.User = url.UserPassword(ru.User.Username(), "xxxxx") } return ru.String() }
CWE-532
28
func fixTransferEncoding(requestMethod string, header Header) ([]string, error) { raw, present := header["Transfer-Encoding"] if !present { return nil, nil } delete(header, "Transfer-Encoding") encodings := strings.Split(raw[0], ",") te := make([]string, 0, len(encodings)) // TODO: Even though we only suppor...
CWE-444
41
func (*ListSubscriptionsRequest) Descriptor() ([]byte, []int) { return file_console_proto_rawDescGZIP(), []int{29} }
CWE-613
7
func (x *DeleteFriendRequest) ProtoReflect() protoreflect.Message { mi := &file_console_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) }
CWE-613
7
func (x *Config_Warning) ProtoReflect() protoreflect.Message { mi := &file_console_proto_msgTypes[46] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { ms.StoreMessageInfo(mi) } return ms } return mi.MessageOf(x) }
CWE-613
7
([ key, value ]) => ({ [key]: exec.bind(null, `git show -s --format=%${value}`) }), ),
CWE-78
6
set escape_for_html(arg:boolean) { this._escape_for_html = arg; }
CWE-79
1
constructor() { // All construction occurs here this.setup_palettes(); this._use_classes = false; this._escape_for_html = true; this.bold = false; this.fg = this.bg = null; this._buffer = ''; this._url_whitelist = { 'http':1, 'https':1 }; }
CWE-79
1
function sendResponse(response1: Response) { try { assert(response1 instanceof ResponseClass); if (message.session) { const counterName = ResponseClass.name.replace("Response", ""); message.session.incrementRequestTotalCounter(c...
CWE-770
37
userId: projectUsers.findOne().users.find((elem) => elem._id === entry._id.userId)?.profile?.name, totalHours, }
CWE-79
1
export function createCatalogWriteAction() { return createTemplateAction<{ name?: string; entity: Entity }>({ id: 'catalog:write', description: 'Writes the catalog-info.yaml for your template', schema: { input: { type: 'object', properties: { entity: { title: 'E...
CWE-22
2
[_sanitize](svg) { return svg.removeAttr('onload'); }
CWE-94
14
const matrix = node.getScreenCTM(); if (res && matrix) { const [x, y, content] = res; const t = tooltip(); t.style.opacity = "1"; t.innerHTML = content; t.style.left = `${window.scrollX + x + matrix.e}px`; t.style.top = `${window.scrollY + y + matrix.f - 15}px`; } else { ...
CWE-79
1
text += ` / ${c.amount(a.budget, a.currency)}`; } text += "<br>"; });
CWE-79
1
export function escape_attribute_value(value) { return typeof value === 'string' ? escape(value, true) : value; }
CWE-79
1
userId: projectUsers.findOne().users.find((elem) => elem._id === entry._id.userId)?.profile?.name,
CWE-79
1
response.responseHeader.serviceResult.should.eql(StatusCodes.BadDiscoveryUrlMissing); } await send_registered_server_request(discoveryServerEndpointUrl, request, check_response); });
CWE-770
37
const unSet = (obj, path, options = {}, tracking = {}) => { let internalPath = path; options = { "transformRead": returnWhatWasGiven, "transformKey": returnWhatWasGiven, "transformWrite": returnWhatWasGiven, ...options }; // No object data if (obj === undefined || obj === null) { return; } // No ...
CWE-915
35
error: err => { reject(err) this.fetching = this.fetching.remove(this.hash(session)) },
CWE-79
1
module.exports = function(key) { key = normalizeKey(key.split('@').pop()); return normalized[key] || false; };
CWE-88
3
getUrl() { return `http://localhost:${this.port}` }
CWE-306
79
__(key) { self.apos.util.warnDevOnce('old-i18n-req-helper', stripIndent` The req.__() and res.__() functions are deprecated and do not localize in A3. Use req.t instead. `); return key; }
CWE-613
7