chore: finalize lab7 security verification
CI / verify (pull_request) Successful in 14m53s

This commit is contained in:
2026-11-06 22:00:42 +03:00
parent 5ac64f51fa
commit a8edaf058d
53 changed files with 1130 additions and 224 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