diff --git a/BuildFiles/Packaging/templates/conffiles-frontend.template b/BuildFiles/Packaging/templates/conffiles-frontend.template index c43d76a5..d79df223 100644 --- a/BuildFiles/Packaging/templates/conffiles-frontend.template +++ b/BuildFiles/Packaging/templates/conffiles-frontend.template @@ -1 +1,3 @@ /opt/swarmops/frontend/machineKey.config +/opt/swarmops/frontend/favicon.ico + diff --git a/Site5/Pages/v5/Financial/ValidateReceipts.aspx.cs b/Site5/Pages/v5/Financial/ValidateReceipts.aspx.cs index 60b891dd..c0c7fe47 100644 --- a/Site5/Pages/v5/Financial/ValidateReceipts.aspx.cs +++ b/Site5/Pages/v5/Financial/ValidateReceipts.aspx.cs @@ -197,7 +197,7 @@ namespace Swarmops.Frontend.Pages.v5.Financial private void PopulateExpenses() { - ExpenseClaims expenses = ExpenseClaims.ForOrganization(this.CurrentOrganization).WhereUnattested; + ExpenseClaims expenses = ExpenseClaims.ForOrganization(this.CurrentOrganization).WhereUnvalidated; foreach (var expenseClaim in expenses) { @@ -226,4 +226,4 @@ namespace Swarmops.Frontend.Pages.v5.Financial public string Title { get; set; } } } -} \ No newline at end of file +} diff --git a/Site5/Pages/v5/Support/StreamUpload.aspx.cs b/Site5/Pages/v5/Support/StreamUpload.aspx.cs index e9c767b3..349666cb 100644 --- a/Site5/Pages/v5/Support/StreamUpload.aspx.cs +++ b/Site5/Pages/v5/Support/StreamUpload.aspx.cs @@ -45,7 +45,7 @@ namespace Swarmops.Pages.v5.Support Document document = Document.FromIdentity(documentId); //Orgid is needed to safely verify permission - int orgId = Organization.PPSEid; + int orgId = 0; // initialize to invalid bool hasPermission = false; @@ -87,6 +87,14 @@ namespace Swarmops.Pages.v5.Support hasPermission = true; break; } + + // TODO: Security leak - check CurrentOrganization against Document's org + + if (this.CurrentUser.HasAccess (new Access(CurrentOrganization, AccessAspect.Financials, AccessType.Write))) + { + hasPermission = true; + break; + } /* if (this.CurrentAuthority.HasPermission(Permission.CanSeeEconomyDetails, orgId, -1, Authorization.Flag.ExactOrganization)) { @@ -181,8 +189,13 @@ namespace Swarmops.Pages.v5.Support // TODO: If still doesn't exist, perhaps return a friendly error image instead? + if (!File.Exists(StorageRoot + legacyMarker + document.ServerFileName)) + { + throw new FileNotFoundException(StorageRoot + legacyMarker + document.ServerFileName); + } + Response.ContentType = contentType + "; filename=" + document.ClientFileName; Response.TransmitFile(StorageRoot + legacyMarker + document.ServerFileName); } } -} \ No newline at end of file +}