Skip to content

Commit fb4219f

Browse files
authored
fix: parse int to correct bit size (coder#15257)
1 parent 074faec commit fb4219f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

coderd/cryptokeys/cache.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ func (c *cache) DecryptingKey(ctx context.Context, id string) (interface{}, erro
163163
return nil, ErrInvalidFeature
164164
}
165165

166-
seq, err := strconv.ParseInt(id, 10, 64)
166+
seq, err := strconv.ParseInt(id, 10, 32)
167167
if err != nil {
168168
return nil, xerrors.Errorf("parse id: %w", err)
169169
}
@@ -192,7 +192,7 @@ func (c *cache) VerifyingKey(ctx context.Context, id string) (interface{}, error
192192
return nil, ErrInvalidFeature
193193
}
194194

195-
seq, err := strconv.ParseInt(id, 10, 64)
195+
seq, err := strconv.ParseInt(id, 10, 32)
196196
if err != nil {
197197
return nil, xerrors.Errorf("parse id: %w", err)
198198
}

0 commit comments

Comments
 (0)