chore: finalize lab7 security verification
CI / verify (pull_request) Failing after 3m27s

This commit is contained in:
2026-11-06 21:39:31 +03:00
parent 5ac64f51fa
commit 97a52eeee6
41 changed files with 759 additions and 150 deletions
-15
View File
@@ -263,21 +263,6 @@ func scanAttachmentWithReferenceAndObjectKey(
return err
}
func scanAttachmentWithReference(row rowScanner, attachment *model.Attachment) error {
var stagingKey *string
err := row.Scan(
&attachment.ID, &attachment.ChatID, &attachment.OwnerID, &attachment.Filename,
&attachment.ContentType, &attachment.SizeBytes, &attachment.SHA256, &attachment.ObjectKey,
&attachment.Status, &attachment.CreatedAt, &attachment.UpdatedAt, &attachment.ReadyAt,
&attachment.PipelineVersion, &attachment.ErrorCode, &stagingKey,
&attachment.Referenced,
)
if stagingKey != nil {
attachment.StagingKey = *stagingKey
}
return err
}
func (s *Store) AttachmentReferenced(ctx context.Context, attachmentID string) (bool, error) {
const query = `SELECT EXISTS (SELECT 1 FROM message_attachments WHERE attachment_id = $1)`
var referenced bool