Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sebastiaan Janssen 4963 posts 14964 karma points MVP admin hq
    Jul 20, 2021 @ 06:11
    Sebastiaan Janssen
    0

    Questions about the Forms security advisory July 2021

    If you have any questions about the forms security advisory today then this is the place to ask, we'll get back to you as soon as possible.

    Details on how to patch your sites are now available in the following blog post:

    https://umbraco.com/blog/security-advisory-20th-of-july-2021-patch-is-now-available/

    For any questions: please specify which Forms version you started on and which Forms version you are updating to.

  • rangler2 3 posts 25 karma points
    Jul 20, 2021 @ 08:17
    rangler2
    1

    Thanks Seb. Minor typo on the blog: Alternatively, you can use the NuGet UI to search for the ClientDependency package. Thanks Andy

  • Sebastiaan Janssen 4963 posts 14964 karma points MVP admin hq
    Jul 20, 2021 @ 08:36
    Sebastiaan Janssen
    0

    Thanks rangler2, that is now fixed 👍

  • Rune Hem Strand 147 posts 909 karma points hq c-trib
    Jul 20, 2021 @ 08:36
    Rune Hem Strand
    0

    Thanks for pointing that out - Fixed ✅

  • Tim van Rooijen 14 posts 45 karma points
    Jul 20, 2021 @ 08:30
    Tim van Rooijen
    1

    Can you all specify what views have required changes for this? We modified all of the field types with custom html.

    Are there any required changes in the fieldtypes?

  • Sebastiaan Janssen 4963 posts 14964 karma points MVP admin hq
    Jul 20, 2021 @ 08:35
    Sebastiaan Janssen
    0

    @Tim, sure thing, here's a diff:

    enter image description here

    So it is only FieldType.FileUpload.cshtml.

  • Tim van Rooijen 14 posts 45 karma points
    Jul 20, 2021 @ 08:37
    Tim van Rooijen
    0

    Thanks for the quick response! Oke clear will do that.

  • Sebastiaan Janssen 4963 posts 14964 karma points MVP admin hq
    Jul 20, 2021 @ 08:59
    Sebastiaan Janssen
    0

    We updated the blog post as well with this info! 👍

  • Jeroen Vantroyen 53 posts 393 karma points c-trib
    Jul 20, 2021 @ 09:49
    Jeroen Vantroyen
    0

    Hi,

    I am in charge of patching a few websites today, since the normal developer team is on holiday.

    I figured I'd do the manual update (overwriting the App_Plugins, bin and Views folder), but post-patch the fileupload field is no longer displayed.

    I've reverted the patch for now and am not inclined to try any other websites. At first glance, I do not see any customizations in the FieldType.FileUpload.cshtml, but I have no dev knowledge about this project unfortunately.

    Any known reason why the field would no longer appear? (The title does appear and I do see the tags for the input field in the code. It's just not visible any more.)

    This is after and before patching: enter image description here

    If I look at the source, one portions stands out. The number of div's is significantly lower. Are those Umbraco standard classes now no longer rendered, or was this custom code added by the development team and I need to call someone in?

    enter image description here

  • Sebastiaan Janssen 4963 posts 14964 karma points MVP admin hq
    Jul 20, 2021 @ 09:56
    Sebastiaan Janssen
    0

    We didn't change any diffs.

    You can see that we changed exactly 2 lines in the views:

    enter image description here

    I suspect that your team has updated ~\Views\Partials\Forms\Fieldtypes\FieldType.FileUpload.cshtml or ~Views\Partials\Forms\Themes\default\Fieldtypes\FieldType.FileUpload.cshtml directly to add those diffs, while we usually encourage copying views into a custom theme folder (but I don't know which version you're on so I can't say for sure if theming is available for you).

    In any case, you can update any FieldType.FileUpload.cshtml file you can find and add a using statement: @using Umbraco.Forms.Core.Providers.FieldTypes and update the line:

    var fileName = filePath.Split('/').Last();

    to

    var fileName = filePath.Split(new[] { FileUpload.EncryptedFilePathAndFileNameSeparator }, StringSplitOptions.None).Last();.

    That should do the trick. So in your case, still copy all the files over, except for the files in ~/Views, update the FieldType.FileUpload.cshtml files manually and you should be up and running.

  • Jeroen Vantroyen 53 posts 393 karma points c-trib
    Jul 20, 2021 @ 10:15
    Jeroen Vantroyen
    2

    Thanks Sebastiaan, for confirming no layout changes on your end.

    It quenched the doubt I already had and I went ahead and cherry-picked a few lines from the old version of ~Views\Partials\Forms\Themes\default\Fieldtypes\FieldType.FileUpload.cshtml as you suspected (and one other file).

    It's looking good now. Sorry for the moment of panic.

    Guess we'll have to talk internally about how to handle customizations :-).

  • Nutty About Hosting 22 posts 75 karma points
    Jul 20, 2021 @ 10:40
    Nutty About Hosting
    0

    I am looking at upgrading umbracoContour on an Umbraco v6.1.6 website. The downloads just say v7 and the contour version is 3.0.20. enter image description here

    Could you advise on whether we just use 3.0.32? Thanks.

  • Sebastiaan Janssen 4963 posts 14964 karma points MVP admin hq
    Jul 20, 2021 @ 10:57
    Sebastiaan Janssen
    0

    @nutty - yes, use UmbracoContour.files.3.0.32 for your v7 updates.

  • Nutty About Hosting 22 posts 75 karma points
    Jul 20, 2021 @ 11:02
    Nutty About Hosting
    0

    What about v6?

  • Sebastiaan Janssen 4963 posts 14964 karma points MVP admin hq
    Jul 20, 2021 @ 11:27
    Sebastiaan Janssen
    0

    Actually it's the same for v6.

    And the same for v4 as well :-)

  • Jesper Mayntzhusen 11 posts 107 karma points c-trib
    Jul 20, 2021 @ 10:49
    Jesper Mayntzhusen
    0

    If anyone else runs into this error like I did: enter image description here

    This happened when I pushed an update to a server that didn't have the umbracoForms.lic file.

  • Sebastiaan Janssen 4963 posts 14964 karma points MVP admin hq
    Jul 20, 2021 @ 11:03
    Sebastiaan Janssen
    0

    @Jesper I am guessing that's a site that is still running on .NET 4.5. You can install the following package first: https://our.umbraco.com/packages/developer-tools/codesharetls12umbraco/

    Or otherwise, drop this as RegisterEvents.cs into App_Code:

    using System.Net;
    using Umbraco.Core;
    
    namespace CodeShare.TLS1._2.Umbraco.EventHandlers
    {
        public class RegisterEvents : ApplicationEventHandler
        {
            protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
            {
                if (ServicePointManager.SecurityProtocol.HasFlag(SecurityProtocolType.Tls12) == false)
                {
                    ServicePointManager.SecurityProtocol = ServicePointManager.SecurityProtocol | SecurityProtocolType.Tls12;
                }
            }
        }
    }
    

    Code from: https://github.com/prjseal/CodeShare.TLS1.2.Umbraco/blob/master/CodeShare.TLS1.2.Umbraco/EventHandlers/RegisterEvents.cs

  • Jesper Mayntzhusen 11 posts 107 karma points c-trib
    Jul 20, 2021 @ 11:06
    Jesper Mayntzhusen
    0

    Committing the license file makes it skip the call to umbraco.com and prevents the YSOD as well. Thanks though!

  • Sebastiaan Janssen 4963 posts 14964 karma points MVP admin hq
    Jul 20, 2021 @ 11:26
    Sebastiaan Janssen
    0

    Ah! Of course, I missed that you actually put the solution in there! 👍

  • CSMB 1 post 71 karma points notactivated
    Jul 21, 2021 @ 08:20
    CSMB
    0

    Hi Jesper.

    We too have the same error message on a site which is running the free Forms license.

    I have installed the 'code share tls 12 umbraco' package as suggested by Sebastiaan,

    We overwrote the files contained in the patch, we also overwritten the UmbracoForms.config file with a back up of the original pre patch one just to be safe.

    After the patch is applied we get the same error message as you.

    Do you have any suggestions how we can resolve this?

    We are currently running "7.0.4" and are patching up to '7.0.7' -

    Many thanks in advance

  • Jesper Mayntzhusen 11 posts 107 karma points c-trib
    Jul 22, 2021 @ 08:15
    Jesper Mayntzhusen
    0

    Ensure that you have the umbracoForms.lic file in your bin folder (or wherever else it may be configed to be: https://our.umbraco.com/documentation/Add-ons/The-Licensing-model/#alternative-license-location)

    It is fine if it is a completely empty file. My issue was it was not tracked by Git, so while I had it locally it wasn't there on my production server after a deployment.

  • rangler2 3 posts 25 karma points
    Jul 20, 2021 @ 11:26
    rangler2
    0

    Hi there, The SQL query to locate upload fields doesn't work in version 7.0.0 for me, it says "Invalid object name 'UFForms'.". Is that expected? I assume my form definitions are in the database as the folders in /app_data/umbracoforms/data are empty. Thanks Andy

  • Sebastiaan Janssen 4963 posts 14964 karma points MVP admin hq
    Jul 20, 2021 @ 11:32
    Sebastiaan Janssen
    0

    @rangler2 Ah, I see in older versions we stored forms in the database differently! You can use the following query instead, I'll get the blog post updated:

    SELECT * FROM [UFFields] WHERE [Fieldtype] = '84a17cf8-b711-46a6-9840-0e4a072ad000'

  • rangler2 3 posts 25 karma points
    Jul 20, 2021 @ 11:37
    rangler2
    1

    Hi, Thanks, however it seems because our install has been customised to store form definitions in blob storage as per

    https://our.umbraco.com/Documentation/Extending/FileSystemProviders/Azure-Blob-Storage/index-v7

    So for us the UFFields table is not present in the database. I was able to download the forms definitions from the forms folder in blob storage and then search those files for 84a17cf8-b711-46a6-9840-0e4a072ad000 to locate the upload fields.

    Thanks Andy

  • Alex M 3 posts 74 karma points
    Jul 20, 2021 @ 11:46
    Alex M
    0

    Hello,

    It seems the instructions for the Security Advisory are not complete.

    It mentions we should not overwrite UmbracoForms.config, but it seems there's a new file format extension that was added to the DisallowedFileUploadExtensions option. In 8.7.5 it was:

    <setting key="DisallowedFileUploadExtensions" value="config,exe,dll,asp,aspx" />
    

    In 8.7.6 it is:

    <setting key="DisallowedFileUploadExtensions" value="config,exe,dll,asp,aspx,js" />
    

    You added JS. I'm guessing this has something to do with the security problem. Following the current instructions, we would not get that added extension to the config.

    Alex

  • Sebastiaan Janssen 4963 posts 14964 karma points MVP admin hq
    Jul 20, 2021 @ 11:53
    Sebastiaan Janssen
    0

    Thanks @Alex, this is a nice-to-have update and not critical relating to this security update.

  • Alex M 3 posts 74 karma points
    Jul 20, 2021 @ 12:16
    Alex M
    1

    Good to know. I thought uploading a carefully crafted js file seemed like a plausible security issue.

    Thanks for the professional handling of the issue and the advanced warning. This is much appreciated. 👍

  • Jesper Mayntzhusen 11 posts 107 karma points c-trib
    Jul 20, 2021 @ 12:59
    Jesper Mayntzhusen
    0

    @Sebastiaan, we upgraded a site from 6.0.8-6.0.9 using NuGet, and were confused the version in the backoffice still said 6.0.8.

    We found out that the NuGet upgrade didn't upgrade the file that the backoffice gets its version from - "/app_plugins/UmbracoForms/version".

    It did do that in the 4.4.8 upgrade, so may have been a miss in just that version?

  • Sebastiaan Janssen 4963 posts 14964 karma points MVP admin hq
    Jul 20, 2021 @ 13:01
    Sebastiaan Janssen
    0

    Yep, we discovered the same this morning and have amended the blog post to also check the stated version in version file if it exists.

    In this wonderful world of legacy we didn't remember the multiple different ways that we've used to display the version number in the dashboard. 🙈

  • Brian Milinski 30 posts 122 karma points
    Jul 20, 2021 @ 15:31
    Brian Milinski
    0

    Hi Sebastiaan,

    I am receiving the error:

    Error loading Partial View script (file: ~/Views/MacroPartials/InsertUmbracoForm.cshtml)

    On all of my forms that utilize file uploads. I am running Umbraco 7.12.2 and Forms 7.1.4.

    I manually updated the files that were mentioned in the diff comparisons in this thread, but still getting that error. If I delete the upload components, the form will work properly. Only the forms that I have an upload component on are broken.

    Any thoughts on this? I used the "Package" install method to update my install by dragging it into the backoffice.

    Thanks, Brian

  • Brian Milinski 30 posts 122 karma points
    Jul 20, 2021 @ 15:54
    Brian Milinski
    0

    Here is the Error in my log files:

    ERROR Umbraco.Forms.Web.Editors.UpdatesController - Unhandled controller exception occurred System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel. at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)

  • Sebastiaan Janssen 4963 posts 14964 karma points MVP admin hq
    Jul 20, 2021 @ 16:35
    Sebastiaan Janssen
    0

    @Brian see Jesper's comments above. We do not recommend just installing the new package on top as it overwrites your config file, you may need to restore your config file as well.

  • Brian Milinski 30 posts 122 karma points
    Jul 20, 2021 @ 16:42
    Brian Milinski
    0

    Thanks Sebastian, so I can revert to he previous Umbraco forms package?

    • I did store off my config file, and after the package was installed I used restored the original UmbracoForms.config file that I had saved off from my solution.
  • Brian Milinski 30 posts 122 karma points
    Jul 20, 2021 @ 16:47
    Brian Milinski
    0

    Also, I did a compare on the config files - the only difference in the UmbracoForms.config file is the version which I manually updated per the documentation of the security advisory. Thanks for any additional insight you can give on this!

  • Sebastiaan Janssen 4963 posts 14964 karma points MVP admin hq
    Jul 20, 2021 @ 17:24
    Sebastiaan Janssen
    1

    You don't need to revert, but you can try if that works. But it sounds like you don't have a license file in place, I also put a workaround in for that error, so maybe that will help and maybe you can check if your FileUpload.cshtml files are in place.

    The best thing to do is take your local version and compare the files in there to the .Files download you can find on the package downloads and see if you missed anything.

  • Brian Milinski 30 posts 122 karma points
    Jul 20, 2021 @ 17:45
    Brian Milinski
    0

    Thanks again for your quick reply. I do have my license file in place in the bin directory. My FileUpload.cshtml files are correctly in place. I will compare all files, but curiously enough this error is ONLY for the one form on my website that I have an upload action on. If I delete the upload field, the form will publish normally. I am wondering if this may be a bug that was released. I will keep comparing files - but everything looks the same as what the zip file contains to this point.

    Appreciate your insights.

  • Jesper Mayntzhusen 11 posts 107 karma points c-trib
    Jul 20, 2021 @ 17:50
    Jesper Mayntzhusen
    1

    Posting a more complete error with full stacktrace will likely help 🙂

  • Brian Milinski 30 posts 122 karma points
    Jul 20, 2021 @ 18:15
    Brian Milinski
    0

    Of course, thanks @Jesper:

    2021-07-20 18:13:57,214 [P6456/D4/T47] WARN umbraco.macro - Error loading Partial View (file: ~/Views/MacroPartials/InsertUmbracoForm.cshtml). Exception: System.Web.HttpException (0x80004005): Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'. ---> System.Web.HttpCompileException (0x80004005): d:\home\site\wwwroot\Views\Partials\Forms\Fieldtypes\FieldType.FileUpload.cshtml(17): error CS0104: 'FileUpload' is an ambiguous reference between 'Umbraco.Forms.Core.Providers.FieldTypes.FileUpload' and 'Microsoft.Web.Helpers.FileUpload' at System.Web.Compilation.AssemblyBuilder.Compile() at System.Web.Compilation.BuildProvidersCompiler.PerformBuild() at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath) at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate) at System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound) at System.Web.Compilation.BuildManager.GetCompiledType(VirtualPath virtualPath) at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) at Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer) at System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData) at ASP.PageViewsPartialsFormsFormcshtml.Execute() in d:\home\site\wwwroot\Views\Partials\Forms\Form.cshtml:line 89 at System.Web.WebPages.WebPageBase.ExecutePageHierarchy() at System.Web.Mvc.WebViewPage.ExecutePageHierarchy() at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) at Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer) at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList1 filters, ActionResult actionResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>cDisplayClass21.1e(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) at System.Web.Mvc.Controller.

  • Jesper Mayntzhusen 11 posts 107 karma points c-trib
    Jul 20, 2021 @ 18:19
    Jesper Mayntzhusen
    1

    In your file d:\home\site\wwwroot\Views\Partials\Forms\Fieldtypes\FieldType.FileUpload.cshtml

    Did you remember the new using statement at the top?

    @using Umbraco.Forms.Core.Providers.FieldTypes
    
  • Brian Milinski 30 posts 122 karma points
    Jul 20, 2021 @ 18:27
    Brian Milinski
    0

    You bet, this is my FileUpload.cshtml file:

    @using Umbraco.Forms.Core.Providers.FieldTypes
    @model Umbraco.Forms.Mvc.Models.FieldViewModel
    
    @{
        var isValid = (Model.Mandatory && Model.Values != null && Model.Values.Any()) || (!Model.Mandatory);
    }
    <input type="file" name="@Model.Name" id="@Model.Id" multiple
           data-val="@(isValid == false ? "true" : null)"
           data-val-required="@(isValid == false ? Model.RequiredErrorMessage : null)" />
    
    @if (Model.Values != null && Model.Values.Any())
    {
        <p>
            <strong>Current File/s:</strong><br />
            @foreach (string filePath in Model.Values)
            {
                var fileName = filePath.Split(new[] { FileUpload.EncryptedFilePathAndFileNameSeparator }, StringSplitOptions.None).Last();
    
                <a>@fileName</a><br />
                <input type="hidden" name="@(Model.Name)[email protected](fileName)" value="@filePath" />
            }
        </p>
    }
    
  • Jesper Mayntzhusen 11 posts 107 karma points c-trib
    Jul 20, 2021 @ 18:31
    Jesper Mayntzhusen
    2

    And you're sure this is the one from the path specified?

    d:\home\site\wwwroot\Views\Partials\Forms\Fieldtypes\FieldType.FileUpload.cshtml
    

    Because there are a few copies of that file in the theme folder as well 🙂

    Otherwise it is a pretty strange error. You could try to specify the namespace, so the line with issues becomes:

    var fileName = filePath.Split(new[] { Umbraco.Forms.Core.Providers.FieldTypes.FileUpload.EncryptedFilePathAndFileNameSeparator }, StringSplitOptions.None).Last();
    
  • Brian Milinski 30 posts 122 karma points
    Jul 20, 2021 @ 18:37
    Brian Milinski
    2

    @Jesper

    Explicitly typing the call with

    Umbraco.Forms.Core.Providers.FieldTypes.FileUpload.EcryptedFilePathAndFileNameSeparator 
    

    Did the trick, thank you so much for sticking with me on this error and helping troubleshoot. Many, many thanks.

    Brian

  • James 14 posts 87 karma points
    Jul 21, 2021 @ 19:33
    James
    2

    Just wanted to add that I too am running into the ambiguous reference error. Fully qualifying the name (Umbraco.Forms.Core.Providers.FieldTypes.FileUpload.EncryptedFilePathAndFileNameSeparator) solved the problem, but good to be aware of it since multiple unrelated people are being affected. May be worth a note in the blog post.

  • Joël 3 posts 74 karma points
    Jul 21, 2021 @ 08:04
    Joël
    0

    Hello,

    I've got a question about this update. I have a form with a file upload and behind the form I wrote some custom code to execute after form submit. It's a ComponentComposer which retrieves the values from the form and does something with it. In this code I do something with the path of the file but this is now encrypted.

    How can I decrypt the path of the file so I can use it again?

    Joël

  • Sebastiaan Janssen 4963 posts 14964 karma points MVP admin hq
    Jul 22, 2021 @ 08:16
    Sebastiaan Janssen
    1

    @Joël Depends on your version, on v7/v8 it will be encryptedFilePath.DecryptWithMachineKey() which is using StringExtensions in Umbraco.Core.

  • Joël 3 posts 74 karma points
    Jul 22, 2021 @ 08:17
    Joël
    1

    Probably should've mentioned the version but its 8.7.6.

    Thx for the reply, I will try it out today!

  • Joël 3 posts 74 karma points
    Jul 22, 2021 @ 08:45
    Joël
    0

    Oke so I tried it out already and on DecryptWithMachineKey() im getting the following error:

    "System.ArgumentException: Invalid value for 'encryptedTicket' parameter."

    I have googled around and can't really find a matching case so I'm not sure what to do here.

    There is no machineKey inside my Web.config and I don't know if its needed

  • Sebastiaan Janssen 4963 posts 14964 karma points MVP admin hq
    Jul 22, 2021 @ 09:25
    Sebastiaan Janssen
    1

    @Joël please email me: [email protected] - this is a bit beyond what we should deal with on this thread :-)

  • Ismael 69 posts 351 karma points
    Jul 22, 2021 @ 02:53
    Ismael
    0

    Hi

    I had to upgrade from 4.1.5 to 4.4.8 and I've found that when I upload a file it gets placed into a folder similar to this: /media/forms/upload/form_c02db14f-12be-4b5d-ac50-b3b3b9bcc9ed/website/xxxxxx.web/app_data/temp/fileuploads/ce11743b-91f1-4a8e-b5d1-8d7bb05adf0a/testimage.png

    however since it has "app_data" in the url, IIS blocks all access to it!

    Any idea why it would be adding in those additional paths? It was a big jump in versions so I'm not sure if somewhere along the way a setting has been miss configured.

    Thanks Ismael.

  • Sebastiaan Janssen 4963 posts 14964 karma points MVP admin hq
    Jul 22, 2021 @ 08:22
    Sebastiaan Janssen
    0

    @Ismael - did you maybe forget to update Views\Partials\Forms\Fieldtypes\FieldType.FileUpload.cshtml ?

  • MickTemp 27 posts 109 karma points
    Jul 22, 2021 @ 04:45
    MickTemp
    0

    Similar to what Ismael observed, uploads are being placed deep under /media, I'm not sure if this is the app_data keyword or something else for me, but these URLs are 404ing for me even though the file exists there. The file is attached to emails correctly but is otherwise inaccessible.

    Example path:

    /Media/forms/upload/form_fb3945a2-6e37-424d-aa4d-5bd6f6724555/(truncated domain name)/httpdocs/app_data/temp/fileuploads/2101072a-b3da-4dec-ab83-b571c9e2ecec/(filename)

    Forms upgrade path:

    6.0.8 => 6.0.9

  • Tracey Penberthy 4 posts 74 karma points
    Jul 22, 2021 @ 09:06
    Tracey Penberthy
    0

    My upgrade path is 6.0.8 => 6.0.9.

    I followed the nuget instructions (using Manage Nuget Packages tool in visual studio). I tested creating a new form and nothing happens when I click "Add Question" (there are no errors in the console either. Do you know what could be causing this?

    Also are you able to list what files have been updated as part of this patch (so I don't have to check a load of unchanged files into source control as I would at the moment)

  • Sebastiaan Janssen 4963 posts 14964 karma points MVP admin hq
    Jul 22, 2021 @ 09:20
    Sebastiaan Janssen
    0

    @Tracey - probably need to bump the ClientDependency version in ~/Config/ClientDependency.config - just make it 1 higher.

    Make sure to commit all the file, everything fits together. If your source control shows the files are not changed then it shouldn't ask you to check them in right?

  • Tracey Penberthy 4 posts 74 karma points
    Jul 22, 2021 @ 09:41
    Tracey Penberthy
    0

    Thanks Sebastiaan

    The ClientDependency.Config version did change.

    Unfortunately my source control (TFS) is trying to check in unchanged files too.

    I am going to try it again from fresh - see how it goes

  • Sebastiaan Janssen 4963 posts 14964 karma points MVP admin hq
    Jul 22, 2021 @ 09:49
    Sebastiaan Janssen
    0

    @Tracey Hmm, well, try to revert everything, if that helps something is really wrong.. we didn't update any of the frontend files. My guess is it might not have worked for you in the first place? 🙈

    These are the files that changed between 6.0.8 and 6.0.9, so only the dlls and 2 of the Views files

    enter image description here

  • Tracey Penberthy 4 posts 74 karma points
    Jul 22, 2021 @ 09:58
    Tracey Penberthy
    0

    Thanks @Sebastiaan, that's really helpful. I ran it again from fresh and it works so there must have been something up with my original code - apologies

  • Sebastiaan Janssen 4963 posts 14964 karma points MVP admin hq
    Jul 22, 2021 @ 10:29
    Sebastiaan Janssen
    0

    @Tracey Great to hear, no need to apologize!

  • Sebastiaan Janssen 4963 posts 14964 karma points MVP admin hq
    Jul 22, 2021 @ 09:19
    Sebastiaan Janssen
    0

    @Ismael and @MickTemp

    We indeed found a problem in the location we store the files! It should still work but it needs to be fixed. We've updated the code and you can try it out now, let us know how it goes:

    For v4 use this updated Umbraco.Forms.Core.Providers.dll https://drive.google.com/file/d/1dHc5fO0CsG3z4WH7ltmG7aVPsyHfP8Fb/view

    For v6 use this updated Umbraco.Forms.Core.Providers.dll https://drive.google.com/file/d/1i1rZICNYuqK6hvjh-BEvTy4F8cUPhqy0/view

  • Ismael 69 posts 351 karma points
    Jul 22, 2021 @ 18:08
    Ismael
    0

    Thanks @Sebastiaan the patch has fixed the media path issue!

    Cheers Ismael.

  • MickTemp 27 posts 109 karma points
    Jul 23, 2021 @ 01:30
    MickTemp
    0

    Thanks, can also confirm this fixed the issue for us also :)

    Is this updated DLL now present in the downloadable packages as well?

  • Keio Kwan 2 posts 22 karma points
    Jul 23, 2021 @ 03:05
    Keio Kwan
    0

    I am afraid to tell that the Umbraco.Forms.Core.Providers 6.0.10 is still not saving the correct path as usual.

    It only save the file to the form folder but not saving to the record value GUID folder. This would cause file overwritten if saving another record with the same file name or the edit record issue (the field may not able to load the saved file in the edit mode).

    6.0.8 Before Patch: ~/media/forms/upload/form_7891e1b6-84bd-49ca-9876-18d6302a1663/05f10198-59f1-41c3-9bb3-b81415639502/my-file.csv

    6.0.9 After Patch: ~/media/forms/upload/form7891e1b6-84bd-49ca-9876-18d6302a1663/om.au/mysite/appdata/temp/fileuploads/8aeee0a5-ba03-4a3b-8465-7cc8a6a92f54/my-file.csv

    6.0.10 After Patch: ~/media/forms/upload/form_7891e1b6-84bd-49ca-9876-18d6302a1663/my-file.csv

  • MickTemp 27 posts 109 karma points
    Jul 23, 2021 @ 03:41
    MickTemp
    0

    Oof keio-equ is correct, I am seeing the same. Would expect the record subfolder to be used.

  • Tim 40 posts 194 karma points
    Jul 23, 2021 @ 06:27
    Tim
    0

    I'm seeing the same issue with the missing subfolder! Which as the others have pointed out will mean files with the same name getting overwritten!

  • Sebastiaan Janssen 4963 posts 14964 karma points MVP admin hq
    Jul 23, 2021 @ 07:53
    Sebastiaan Janssen
    1

    Hey all that is really strange about the paths. I can only see that code being updated first in version 7. But I can reproduce in 6.0.8 that the unique path works. Not sure what happened.

    But in any case, not a problem, we've got some updated files now to fix this and make the path unique again:

    For v4 use this updated Umbraco.Forms.Core.Providers.dll https://drive.google.com/file/d/1dHc5fO0CsG3z4WH7ltmG7aVPsyHfP8Fb/view

    For v6 use this updated Umbraco.Forms.Core.Providers.dll https://drive.google.com/file/d/1i1rZICNYuqK6hvjh-BEvTy4F8cUPhqy0/view

    I've also updated the links in the previous post in case people don't scroll this far down 🙂

  • Niek van der Reest 1 post 71 karma points
    Jul 23, 2021 @ 11:04
    Niek van der Reest
    0

    I've had the same problem in 4 different projects, strange thing is that it does NOT occur on every applied patch, i've had upgrades from 4.4.7 to 4.4.8 go well and now also one that does F up the path.

    I fixed it for v6.0.9 in a project implementing a FileUpload override on the fieldtype. Overriding the ConvertToRecord method

    public override IEnumerable<object> ConvertToRecord(Field field, IEnumerable<object> postedValues, HttpContextBase context)
        {
            List<object> list = new List<object>();
            foreach (object current in postedValues)
            {
                if (current != null && !string.IsNullOrEmpty(current.ToString()))
                {
                    string text = IOHelper.MapPath(this.DecryptFilePath(current.ToString()));
                    string arg = context.Request["FormId"];
    
                    var startindex = text.LastIndexOf(Configuration.UploadTempPath.Substring(Configuration.UploadTempPath.LastIndexOf("/") + 1), StringComparison.OrdinalIgnoreCase);
                    string arg2 = text.Substring(startindex);
                    string text2 = Configuration.UploadPath;
                    if (SemVersion.Parse(Configuration.Version, false) < new SemVersion(4, 4, 0, "", ""))
                    {
                        text2 = text2.Substring(8);
                    }
                    string text3 = string.Format("{0}/form_{1}/{2}", text2, arg, arg2).ToLower(CultureInfo.InvariantCulture);
                    MediaFileSystem fileSystemProvider = FileSystemProviderManager.Current.GetFileSystemProvider<MediaFileSystem>();
                    if (File.Exists(text))
                    {
                        using (Stream stream = File.OpenRead(text))
                        {
                            fileSystemProvider.AddFile(text3, stream);
                        }
                        FileInfo fileInfo = new FileInfo(text);
                        if (fileInfo.Directory != null && Directory.Exists(fileInfo.Directory.FullName))
                        {
                            File.Delete(text);
                            Directory.Delete(fileInfo.Directory.FullName);
                        }
                        list.Add(fileSystemProvider.GetUrl(text3));
                    }
                }
            }
            return list;
        }
    

    The main part is making fixing the "arg2" variable which is done with the 2 lines.

    var startindex = text.LastIndexOf(Configuration.UploadTempPath.Substring(Configuration.UploadTempPath.LastIndexOf("/") + 1), StringComparison.OrdinalIgnoreCase);
    string arg2 = text.Substring(startindex);
    
  • Sebastiaan Janssen 4963 posts 14964 karma points MVP admin hq
    Jul 28, 2021 @ 07:37
    Sebastiaan Janssen
    0

    @MickTemp / @Tim / @keio-equ - did any of you try the latest dlls and did they work for you as expected now? If so we'll create a new release with that fix next week. Thanks!

  • Keio Kwan 2 posts 22 karma points
    Jul 30, 2021 @ 01:58
    Keio Kwan
    0

    Hi Sebastiaan,

    Yes, tested and applied the latest 6.0.10. Now it is working as expected.

    Thank you so much for your help.

  • MickTemp 27 posts 109 karma points
    Aug 05, 2021 @ 00:23
    MickTemp
    1

    Hi Sebastiaan,

    Late reply, been flat out. Can also confirm this is working as expected, thanks.

  • Anson 2 posts 72 karma points
    Jul 26, 2021 @ 20:20
    Anson
    0

    Hello Sebastiaan,

    I am working on Umbraco Forms update for two sites:
    Site 1st) from v7.4.1 to v7.4.3
    Site 2nd) from v7.0.4 to v7.0.7

    May I know what are the diffs of the above versions changes? As I found that the customized Forms fields were changed after the patching. I am trying to avoid overwriting user data.

    Thank you very much for your help.

    Best regards,
    Anson

  • Sebastiaan Janssen 4963 posts 14964 karma points MVP admin hq
    Jul 28, 2021 @ 07:36
    Sebastiaan Janssen
    0

    @Anson - You need to use a diff tool like WinDiff or BeyondCompare to have a look at what files have changed between those versions. In the patch releases from 7.4.2 to 7.4.3 and from 7.0.6 to 7.0.7 only the Upload view has changed as you can see in the diff view I posted a bit earlier in this thread.

  • Anson 2 posts 72 karma points
    Jul 28, 2021 @ 07:45
    Anson
    0

    @Sebastiaan, thank you for your quick reply. Yes I can see the diff view posted earlier, I would like to confirm this diff also apply to the versions I mentioned.
    I finally found that, this is the same as the issue of form labels not showing that has already been mentioned in another post (issue460). I have tried the work around (2), and it did work for Chrome browser.

  • Ian Campbell 3 posts 73 karma points
    Jul 28, 2021 @ 12:34
    Ian Campbell
    0

    Hi there

    I've just updated a client site to Umbraco Forms 7.4.3 and Google ReCaptcha is no longer working?

    Here is a link to a test form showing the problem https://www.fhft.nhs.uk/terms-and-conditions/form-test/

    Does anyone else have this issue?

    Thanks Ian

  • Sebastiaan Janssen 4963 posts 14964 karma points MVP admin hq
    Jul 30, 2021 @ 06:50
    Sebastiaan Janssen
    0

    @Ian seems to work now, looks like you got it fixed! 👍

  • Ian Campbell 3 posts 73 karma points
    Jul 30, 2021 @ 09:03
    Ian Campbell
    0

    @Sebastiaan - the ReCaptcha field does load ok but when we submit the form it always returns 'Recaptcha Verification Failed' and I don't see anything in the error log.

  • Sebastiaan Janssen 4963 posts 14964 karma points MVP admin hq
    Jul 30, 2021 @ 09:12
    Sebastiaan Janssen
    0

    @Ian I don't know, none of that code was touched.

    I do notice you're using recaptcha v2 and I believe that one is pretty broken to begin with (on Google's end).
    In version 7.5 of Forms we added support for Recaptcha 3, which is what we recommend you use.

  • Ian Campbell 3 posts 73 karma points
    Jul 30, 2021 @ 09:16
    Ian Campbell
    0

    Thanks @sebastiaan I will give that a try :)

  • Dale McCutcheon 31 posts 134 karma points
    Aug 09, 2021 @ 13:27
    Dale McCutcheon
    0

    Hey,

    I'm looking to update contour from 3.0.15 to the latest version can you advise on how i do that? the patch notes are not clear on how i actually got about upgrading.

    I should add Contour is not been added through Nuget and only through Umbraco backoffice which appears to show no updates available.

    Cheers Dale

  • Sebastiaan Janssen 4963 posts 14964 karma points MVP admin hq
    Aug 09, 2021 @ 14:03
    Sebastiaan Janssen
    0

    @Dale this is out of scope for this thread.

    I don't think we have good steps to upgrade. I found this thread:

    https://our.umbraco.com/forum/umbraco-forms/92077-upgrade-contour-to-forms

    Which links to other threads that could get you from Contour to Forms version 4, from which you should be able to upgrade to later versions.

    However some of these links are dead, so we'll need to ask archive.org for help:

    https://web.archive.org/web/20151024210147/https://our.umbraco.org/projects/developer-tools/umbraco-forms-migration/computer-says-no/59800-Steps-to-use

    The migration tool leads to this GitHub repo for the source: https://github.com/TimGeyssens/ContourToUmbracoFormsMigrator - so if it doesn't work there's some debugging to do.

    Ultimately, I would say you're probably better off starting fresh with a new install of Forms and manually recreating the forms you previously had (yes I know, if there's a 100 of them that might not be the easiest 🙂).

    In any case: we don't have anything good for that and don't have any support available for it either I'm afraid.

  • Dale McCutcheon 31 posts 134 karma points
    Aug 09, 2021 @ 14:13
    Dale McCutcheon
    0

    Hey Sebastiaan,

    So just to clarify there is no easy way for me to be able to upgrade Contour from 3.0.15 to the latest patch 3.0.32?

    And the approach i should take is to install a fresh copy of Umbraco forms and re-create those forms?

    Cheers Dale

  • Sebastiaan Janssen 4963 posts 14964 karma points MVP admin hq
    Aug 09, 2021 @ 14:30
    Sebastiaan Janssen
    0

    Ah, no that's not what I thought you were asking!

    Updating from Contour 3.0.15 to 3.0.32 is a matter of copying files over, as described in the blog post under the heading .

    I thought you wanted to use Umbraco Forms instead of Contour.

  • Björn Norlén 4 posts 74 karma points
    Aug 16, 2021 @ 13:09
    Björn Norlén
    0

    Hi, We have an Umbraco solution which is running Umbraco 8.15.1 with forms 8.1.1 and it's working fine. However, when I try to upgrade to a higher version (8.1.X) i get some problems. When I try to submit an answer to one of the forms I get an error on the text-area field (the form consists of two multiple choice fields and one text-area). I've tried updating to forms 8.1.2 and 8.1.6.

    The error says "Unexpected value: 'My submitted text'. Expected one of these: 'Namn:', 'Gatuadress:', 'Tfn:', 'E-post:'". I don't understand where the values 'Namn:', 'Gatuadress:', 'Tfn:' and 'E-post:' are coming from, there are no such fields in the form or corresponding data in the form. There's also no validation for that field in the form. I also have another form with several multiple choice fields and text-areas but there are no issues submitting answers in that form.

    Lastly there's a problem in Umbraco. When I try to remove a field from one of the forms I just get sent to the content section in Umbraco. I can add fields to a form but I can't remove one. This is currently occurring locally on my machine (haven't published yet) and when I restore to use forms 8.1.1 there are no problems. Any ideas of what's going on?

  • Björn Norlén 4 posts 74 karma points
    Aug 17, 2021 @ 13:06
    Björn Norlén
    0

    Found the issues. The problem in the backoffice was due to a-tags being in use and a fix for that was posted in https://github.com/umbraco/Umbraco.Forms.Issues/issues/317. The reason for one of the forms text-area field was behaving strangely was because of the property preValues in the forms json-file had values and wasn't empty.

  • Carsten Nørregaard Panek 32 posts 122 karma points
    Sep 06, 2021 @ 09:21
    Carsten Nørregaard Panek
    0

    Hi

    We have a website running Umbraco 7.2.1 and Forms 4.4.9

    After the upgrade we are seing some problems with uploaded files.

    When a specific form is posted, there is a workflow which creates some content.

    The form contains 2 upload fields, one for a picture and one for a sound file like mp3 or m4a.

    The picture works like before the patch, but links to the mp3 or m4a results in the webpages login page being returned instead of the file. (302 redirect to members login page)

    Entries posted before the patch links to a path like this: /media/forms/upload/113b2718-29b0-408a-bf83-ffa7119d1dfc/demo.mp3 And returns the file.

    Entries posted after the patch links to a path like: /media/forms/upload/form_b8c06678-1d91-4444-981e-b6c79ba83efc/c0c3f094-7119-4476-b485-e3e68a4c9f76/demo.mp3 And is redirected to the websites login page (members login)

    Any suggestions to solving this?

  • Carsten Nørregaard Panek 32 posts 122 karma points
    Sep 07, 2021 @ 06:52
    Carsten Nørregaard Panek
    0

    The problem was the package mediaprotect 1.6 which where not compatible with the new path.

    It was not used on this specific site anymore, so I just removed the package.

Please Sign in or register to post replies

Write your reply to:

Draft