Code Monkey home page Code Monkey logo

aspnetcoremvcsharedlocalization's Introduction

Shared Localization in ASP.NET Core MVC

https://damienbod.com/2017/11/01/shared-localization-in-asp-net-core-mvc/

Test URLs:

https://localhost:44371/Account/Register?culture=de-CH&ui-culture=de-CH

https://localhost:44371/Account/Register?culture=it-CH&ui-culture=it-CH

https://localhost:44371/Account/Register?culture=fr-CH&ui-culture=fr-CH

https://localhost:44371/Account/Register?culture=en-US&ui-culture=en-US

History

2022-03-20 Updated to .NET 6.0

2020-11-29 Updated to .NET 5.0

2020-11-08 Updated to .NET Core 3.1.9, updated npm packages

2020-09-11 Updated to .NET Core 3.1.8

2020-07-28 Updated to .NET Core 3.1.6

2018-12-04 Updated to .NET Core 2.2

2018-11-27 Updated to .NET Core 2.2, updated npm packages

2018-09-02 Updated to .NET Core 2.1, Bootstrap 4

aspnetcoremvcsharedlocalization's People

Contributors

damienbod avatar dependabot[bot] avatar mmunchandersen avatar philshishov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

aspnetcoremvcsharedlocalization's Issues

Potential Security Vulnerabilities

While it is obvious that this is a demo project for https://damienbod.com/2017/11/01/shared-localization-in-asp-net-core-mvc/ it creates an impression of a maintained sample (2020-09-11 Updated to .NET Core 3.1.8) and may be used as a template for real project.

Summary

AspNetCoreMvcSharedLocalization is vulnerable to Cross-Site Scripting (XSS) and Cross-Site Request Forgery (CSRF) that may lead to the elevation of privileges and per-user denial of service (DoS).

Details

Issue 1: XSS (CVE-2018-0784)

The application doesn't have the fix for CVE-2018-0784 that was found in ASP.NET Core templates. It is vulnerable to XSS if the logged-in user is tricked into clicking a malicious link like https://localhost:44315/manage/EnableAuthenticator?AuthenticatorUri=%22%3E%3C/div%3E%00%00%00%00%00%00%00%3Cscript%3Ealert(%22XSS%22)%3C/script%3E and enters an invalid verification code. Mode details are available in this blog post.

Impact

This issue may lead to the elevation of privileges.

Remediation

Modify the code according to the instructions from the advisory.

Issue 2: CSRF (CVE-2018-0785)

The application doesn't have the fix for CVE-2018-0785 that was found in ASP.NET Core templates. It is vulnerable to CSRF. A logged-in user with enabled Second Factor Authentication (2FA) may lose their recovery codes if they are tricked into clicking a link like https://localhost:44315/manage/GenerateRecoveryCodes or visit a malicious site that makes the request without the user's consent. As a result the user may be permanently locked out of their account after loosing access to their 2FA device, as the initial recovery codes would no longer be valid.

Impact

This issue may lead to the per-user DoS.

Remediation

Modify the code according to the instructions from the advisory.

Security contact?

Hi, how could I report a potential security vulnerability in the project?

Combine with conventional approach?

Can we combine this approach with the asp.net core's convention based one?

I mean while I am using Resources/ViewModel/Home/Index.en-US.resx for /Home/Index.cshtml, on the other hand I want to get localized strings for /Home/About.cshtml from Resources/Shared.en-US.resx?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.