Skip to content

Commit

Permalink
AdaCore#376, Multipart_Message.Store_Attachments allows files to be u…
Browse files Browse the repository at this point in the history
…ploaded on the server even is Upload_Directory is disabled (empty String)
  • Loading branch information
dsauvage committed Apr 13, 2024
1 parent 349e6f7 commit d0a4d4a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/aws-server-http_utils.adb
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,11 @@ package body AWS.Server.HTTP_Utils is
begin
begin
if Mode in Attachment .. File_Upload then
if CNF.Upload_Directory (Server_Config) = "" then
raise Constraint_Error
with "File upload not supported by server "
& CNF.Server_Name (Server_Config);
end if;
Streams.Stream_IO.Create
(File, Streams.Stream_IO.Out_File, Server_Filename);
end if;
Expand Down

0 comments on commit d0a4d4a

Please sign in to comment.