Skip to content

Commit 26aabac

Browse files
committed
Updates
1 parent a1d33af commit 26aabac

34 files changed

+577
-571
lines changed

.openpublishing.redirection.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,6 +1322,31 @@
13221322
"source_path": "aspnetcore/blazor/security/server/account-confirmation-and-password-recovery.md",
13231323
"redirect_url": "/aspnet/core/blazor/security/account-confirmation-and-password-recovery",
13241324
"redirect_document_id": false
1325+
},
1326+
{
1327+
"source_path": "aspnetcore/blazor/security/server/interactive-server-side-rendering.md",
1328+
"redirect_url": "/aspnet/core/blazor/security/interactive-server-side-rendering",
1329+
"redirect_document_id": false
1330+
},
1331+
{
1332+
"source_path": "aspnetcore/blazor/security/server/qrcodes-for-authenticator-apps.md",
1333+
"redirect_url": "/aspnet/core/blazor/security/qrcodes-for-authenticator-apps",
1334+
"redirect_document_id": false
1335+
},
1336+
{
1337+
"source_path": "aspnetcore/blazor/security/server/static-server-side-rendering.md",
1338+
"redirect_url": "/aspnet/core/blazor/security/static-server-side-rendering",
1339+
"redirect_document_id": false
1340+
},
1341+
{
1342+
"source_path": "aspnetcore/blazor/security/server/additional-scenarios.md",
1343+
"redirect_url": "/aspnet/core/blazor/security/additional-scenarios",
1344+
"redirect_document_id": false
1345+
},
1346+
{
1347+
"source_path": "aspnetcore/blazor/security/server/index.md",
1348+
"redirect_url": "/aspnet/core/blazor/security/",
1349+
"redirect_document_id": false
13251350
}
13261351
]
13271352
}

aspnetcore/blazor/call-web-api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ For guidance on mitigating overposting attacks, see <xref:tutorials/first-web-ap
903903

904904
### Server-side
905905

906-
* <xref:blazor/security/server/additional-scenarios>: Includes coverage on using <xref:System.Net.Http.HttpClient> to make secure web API requests.
906+
* <xref:blazor/security/additional-scenarios>: Includes coverage on using <xref:System.Net.Http.HttpClient> to make secure web API requests.
907907
* <xref:fundamentals/http-requests>
908908
* <xref:security/enforcing-ssl>
909909
* [Kestrel HTTPS endpoint configuration](xref:fundamentals/servers/kestrel/endpoints)

aspnetcore/blazor/components/prerender.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ Prerendering guidance is organized in the Blazor documentation by subject matter
159159
* [Prerendering when integrating components into Razor Pages and MVC apps](xref:blazor/components/integration)
160160

161161
* Authentication and authorization
162-
* [Server-side threat mitigation: Cross-site scripting (XSS)](xref:blazor/security/server/interactive-server-side-rendering#cross-site-scripting-xss)
162+
* [Server-side threat mitigation: Cross-site scripting (XSS)](xref:blazor/security/interactive-server-side-rendering#cross-site-scripting-xss)
163163
* [Server-side unauthorized content display while prerendering with a custom `AuthenticationStateProvider`](xref:blazor/security/server/index#unauthorized-content-display-while-prerendering-with-a-custom-authenticationstateprovider)
164164
* [Blazor WebAssembly rendered component authentication with prerendering](xref:blazor/security/webassembly/additional-scenarios#prerendering-with-authentication)
165165

aspnetcore/blazor/components/prerendering-and-integration.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,7 @@ To resolve the problem, use ***either*** of the following approaches:
967967
* [Authentication and authorization: General aspects](xref:blazor/security/index#aspnet-core-blazor-authentication-and-authorization)
968968
* [Handle Errors: Prerendering](xref:blazor/fundamentals/handle-errors#prerendering)
969969
* [Host and deploy: Blazor Server](xref:blazor/host-and-deploy/server)
970-
* [Threat mitigation: Cross-site scripting (XSS)](xref:blazor/security/server/interactive-server-side-rendering#cross-site-scripting-xss)
970+
* [Threat mitigation: Cross-site scripting (XSS)](xref:blazor/security/interactive-server-side-rendering#cross-site-scripting-xss)
971971
* <xref:Microsoft.AspNetCore.Components.Routing.Router.OnNavigateAsync> is executed *twice* when prerendering: [Handle asynchronous navigation events with `OnNavigateAsync`](xref:blazor/fundamentals/routing#handle-asynchronous-navigation-events-with-onnavigateasync)
972972

973973
:::zone-end
@@ -1912,7 +1912,7 @@ To resolve the problem, use ***either*** of the following approaches:
19121912
* [Authentication and authorization: General aspects](xref:blazor/security/index#aspnet-core-blazor-authentication-and-authorization)
19131913
* [Handle Errors: Prerendering](xref:blazor/fundamentals/handle-errors#prerendering)
19141914
* [Host and deploy: Blazor Server](xref:blazor/host-and-deploy/server)
1915-
* [Threat mitigation: Cross-site scripting (XSS)](xref:blazor/security/server/interactive-server-side-rendering#cross-site-scripting-xss)
1915+
* [Threat mitigation: Cross-site scripting (XSS)](xref:blazor/security/interactive-server-side-rendering#cross-site-scripting-xss)
19161916

19171917
:::zone-end
19181918

@@ -2618,7 +2618,7 @@ To resolve the problem, use ***either*** of the following approaches:
26182618
* [Authentication and authorization: General aspects](xref:blazor/security/index#aspnet-core-blazor-authentication-and-authorization)
26192619
* [Handle Errors: Prerendering](xref:blazor/fundamentals/handle-errors#prerendering)
26202620
* [Host and deploy: Blazor Server](xref:blazor/host-and-deploy/server)
2621-
* [Threat mitigation: Cross-site scripting (XSS)](xref:blazor/security/server/interactive-server-side-rendering#cross-site-scripting-xss)
2621+
* [Threat mitigation: Cross-site scripting (XSS)](xref:blazor/security/interactive-server-side-rendering#cross-site-scripting-xss)
26222622

26232623
:::zone-end
26242624

@@ -3058,7 +3058,7 @@ To resolve the problem, use ***either*** of the following approaches:
30583058
* [Authentication and authorization: General aspects](xref:blazor/security/index#aspnet-core-blazor-authentication-and-authorization)
30593059
* [Handle Errors: Prerendering](xref:blazor/fundamentals/handle-errors#prerendering)
30603060
* [Host and deploy: Blazor Server](xref:blazor/host-and-deploy/server)
3061-
* [Threat mitigation: Cross-site scripting (XSS)](xref:blazor/security/server/interactive-server-side-rendering#cross-site-scripting-xss)
3061+
* [Threat mitigation: Cross-site scripting (XSS)](xref:blazor/security/interactive-server-side-rendering#cross-site-scripting-xss)
30623062

30633063
:::zone-end
30643064

aspnetcore/blazor/components/render-modes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ To address this scenario, inject the service in a new imports file placed in the
950950

951951
* WebSocket compression
952952
* <xref:blazor/fundamentals/signalr#websocket-compression-for-interactive-server-components>
953-
* <xref:blazor/security/server/interactive-server-side-rendering#interactive-server-components-with-websocket-compression-enabled>
953+
* <xref:blazor/security/interactive-server-side-rendering#interactive-server-components-with-websocket-compression-enabled>
954954
* <xref:blazor/js-interop/ssr>
955955
* [Cascading values/parameters and render mode boundaries](xref:blazor/components/cascading-values-and-parameters#cascading-valuesparameters-and-render-mode-boundaries): Also see the [Root-level cascading parameters](xref:blazor/components/cascading-values-and-parameters#root-level-cascading-parameters) section earlier in the article.
956956
* <xref:blazor/components/class-libraries-with-static-ssr>

aspnetcore/blazor/file-uploads.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ To read data from a user-selected file, call <xref:Microsoft.AspNetCore.Componen
4949

5050
<xref:Microsoft.AspNetCore.Components.Forms.IBrowserFile.OpenReadStream%2A> enforces a maximum size in bytes of its <xref:System.IO.Stream>. Reading one file or multiple files larger than 500 KB results in an exception. This limit prevents developers from accidentally reading large files into memory. The `maxAllowedSize` parameter of <xref:Microsoft.AspNetCore.Components.Forms.IBrowserFile.OpenReadStream%2A> can be used to specify a larger size if required.
5151

52-
If you need access to a <xref:System.IO.Stream> that represents the file's bytes, use <xref:Microsoft.AspNetCore.Components.Forms.IBrowserFile.OpenReadStream%2A?displayProperty=nameWithType>. Avoid reading the incoming file stream directly into memory all at once. For example, don't copy all of the file's bytes into a <xref:System.IO.MemoryStream> or read the entire stream into a byte array all at once. These approaches can result in degraded app performance and potential [Denial of Service (DoS)](xref:blazor/security/server/interactive-server-side-rendering#denial-of-service-dos-attacks) risk, especially for server-side components. Instead, consider adopting either of the following approaches:
52+
If you need access to a <xref:System.IO.Stream> that represents the file's bytes, use <xref:Microsoft.AspNetCore.Components.Forms.IBrowserFile.OpenReadStream%2A?displayProperty=nameWithType>. Avoid reading the incoming file stream directly into memory all at once. For example, don't copy all of the file's bytes into a <xref:System.IO.MemoryStream> or read the entire stream into a byte array all at once. These approaches can result in degraded app performance and potential [Denial of Service (DoS)](xref:blazor/security/interactive-server-side-rendering#denial-of-service-dos-attacks) risk, especially for server-side components. Instead, consider adopting either of the following approaches:
5353

5454
* Copy the stream directly to a file on disk without reading it into memory. Note that Blazor apps executing code on the server aren't able to access the client's file system directly.
5555
* Upload files from the client directly to an external service. For more information, see the [Upload files to an external service](#upload-files-to-an-external-service) section.

aspnetcore/blazor/fundamentals/dependency-injection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ public static class CircuitServicesServiceCollectionExtensions
612612

613613
Access the circuit-scoped services by injecting the `CircuitServicesAccessor` where it's needed.
614614

615-
For an example that shows how to access the <xref:Microsoft.AspNetCore.Components.Authorization.AuthenticationStateProvider> from a <xref:System.Net.Http.DelegatingHandler> set up using <xref:System.Net.Http.IHttpClientFactory>, see <xref:blazor/security/server/additional-scenarios#access-authenticationstateprovider-in-outgoing-request-middleware>.
615+
For an example that shows how to access the <xref:Microsoft.AspNetCore.Components.Authorization.AuthenticationStateProvider> from a <xref:System.Net.Http.DelegatingHandler> set up using <xref:System.Net.Http.IHttpClientFactory>, see <xref:blazor/security/additional-scenarios#access-authenticationstateprovider-in-outgoing-request-middleware>.
616616

617617
:::moniker-end
618618

aspnetcore/blazor/fundamentals/signalr.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ The `frame-ancestors` CSP can be removed manually by setting the value of `Confi
4646

4747
Usage examples:
4848

49-
Disable compression by setting `ConfigureWebSocketOptions` to `null`, which reduces the [vulnerability of the app to attack](xref:blazor/security/server/interactive-server-side-rendering#interactive-server-components-with-websocket-compression-enabled) but may result in reduced performance:
49+
Disable compression by setting `ConfigureWebSocketOptions` to `null`, which reduces the [vulnerability of the app to attack](xref:blazor/security/interactive-server-side-rendering#interactive-server-components-with-websocket-compression-enabled) but may result in reduced performance:
5050

5151
```csharp
5252
builder.MapRazorComponents<App>()
@@ -78,7 +78,7 @@ builder.MapRazorComponents<App>()
7878
>
7979
> Additional options include specifying one or more host sources and scheme sources.
8080
81-
For security implications, see <xref:blazor/security/server/interactive-server-side-rendering#interactive-server-components-with-websocket-compression-enabled>. For more information on the `frame-ancestors` directive, see [CSP: `frame-ancestors` (MDN documentation)](https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors).
81+
For security implications, see <xref:blazor/security/interactive-server-side-rendering#interactive-server-components-with-websocket-compression-enabled>. For more information on the `frame-ancestors` directive, see [CSP: `frame-ancestors` (MDN documentation)](https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Security-Policy/frame-ancestors).
8282

8383
:::moniker-end
8484

@@ -300,7 +300,7 @@ services.AddServerSideBlazor().AddHubOptions(options =>
300300
and version if fixed. -->
301301

302302
> [!WARNING]
303-
> The default value of <xref:Microsoft.AspNetCore.SignalR.HubOptions.MaximumReceiveMessageSize> is 32 KB. Increasing the value may increase the risk of [Denial of Service (DoS) attacks](xref:blazor/security/server/interactive-server-side-rendering#denial-of-service-dos-attacks).
303+
> The default value of <xref:Microsoft.AspNetCore.SignalR.HubOptions.MaximumReceiveMessageSize> is 32 KB. Increasing the value may increase the risk of [Denial of Service (DoS) attacks](xref:blazor/security/interactive-server-side-rendering#denial-of-service-dos-attacks).
304304
>
305305
> Blazor relies on <xref:Microsoft.AspNetCore.SignalR.HubOptions.MaximumParallelInvocationsPerClient%2A> set to 1, which is the default value. For more information, see [MaximumParallelInvocationsPerClient > 1 breaks file upload in Blazor Server mode (`dotnet/aspnetcore` #53951)](https://github.com/dotnet/aspnetcore/issues/53951).
306306
@@ -413,7 +413,7 @@ builder.Services.AddRazorComponents().AddInteractiveServerComponents()
413413
.AddHubOptions(options => options.MaximumReceiveMessageSize = 64 * 1024);
414414
```
415415

416-
Increasing the SignalR incoming message size limit comes at the cost of requiring more server resources, and it increases the risk of [Denial of Service (DoS) attacks](xref:blazor/security/server/interactive-server-side-rendering#denial-of-service-dos-attacks). Additionally, reading a large amount of content in to memory as strings or byte arrays can also result in allocations that work poorly with the garbage collector, resulting in additional performance penalties.
416+
Increasing the SignalR incoming message size limit comes at the cost of requiring more server resources, and it increases the risk of [Denial of Service (DoS) attacks](xref:blazor/security/interactive-server-side-rendering#denial-of-service-dos-attacks). Additionally, reading a large amount of content in to memory as strings or byte arrays can also result in allocations that work poorly with the garbage collector, resulting in additional performance penalties.
417417

418418
A better option for reading large payloads is to send the content in smaller chunks and process the payload as a <xref:System.IO.Stream>. This can be used when reading large JavaScript (JS) interop JSON payloads or if JS interop data is available as raw bytes. For an example that demonstrates sending large binary payloads in server-side apps that uses techniques similar to the [`InputFile` component](xref:blazor/file-uploads), see the [Binary Submit sample app](https://github.com/aspnet/samples/tree/main/samples/aspnetcore/blazor/BinarySubmit) and the [Blazor `InputLargeTextArea` Component Sample](https://github.com/aspnet/samples/tree/main/samples/aspnetcore/blazor/InputLargeTextArea).
419419

@@ -432,7 +432,7 @@ builder.Services.AddServerSideBlazor()
432432
.AddHubOptions(options => options.MaximumReceiveMessageSize = 64 * 1024);
433433
```
434434

435-
Increasing the SignalR incoming message size limit comes at the cost of requiring more server resources, and it increases the risk of [Denial of Service (DoS) attacks](xref:blazor/security/server/interactive-server-side-rendering#denial-of-service-dos-attacks). Additionally, reading a large amount of content in to memory as strings or byte arrays can also result in allocations that work poorly with the garbage collector, resulting in additional performance penalties.
435+
Increasing the SignalR incoming message size limit comes at the cost of requiring more server resources, and it increases the risk of [Denial of Service (DoS) attacks](xref:blazor/security/interactive-server-side-rendering#denial-of-service-dos-attacks). Additionally, reading a large amount of content in to memory as strings or byte arrays can also result in allocations that work poorly with the garbage collector, resulting in additional performance penalties.
436436

437437
A better option for reading large payloads is to send the content in smaller chunks and process the payload as a <xref:System.IO.Stream>. This can be used when reading large JavaScript (JS) interop JSON payloads or if JS interop data is available as raw bytes. For an example that demonstrates sending large binary payloads in Blazor Server that uses techniques similar to the [`InputFile` component](xref:blazor/file-uploads), see the [Binary Submit sample app](https://github.com/aspnet/samples/tree/main/samples/aspnetcore/blazor/BinarySubmit) and the [Blazor `InputLargeTextArea` Component Sample](https://github.com/aspnet/samples/tree/main/samples/aspnetcore/blazor/InputLargeTextArea).
438438

@@ -451,7 +451,7 @@ services.AddServerSideBlazor()
451451
.AddHubOptions(options => options.MaximumReceiveMessageSize = 64 * 1024);
452452
```
453453

454-
Increasing the SignalR incoming message size limit comes at the cost of requiring more server resources, and it increases the risk of [Denial of Service (DoS) attacks](xref:blazor/security/server/interactive-server-side-rendering#denial-of-service-dos-attacks). Additionally, reading a large amount of content in to memory as strings or byte arrays can also result in allocations that work poorly with the garbage collector, resulting in additional performance penalties.
454+
Increasing the SignalR incoming message size limit comes at the cost of requiring more server resources, and it increases the risk of [Denial of Service (DoS) attacks](xref:blazor/security/interactive-server-side-rendering#denial-of-service-dos-attacks). Additionally, reading a large amount of content in to memory as strings or byte arrays can also result in allocations that work poorly with the garbage collector, resulting in additional performance penalties.
455455

456456
:::moniker-end
457457

@@ -730,7 +730,7 @@ builder.Services.AddIdleCircuitHandler(options =>
730730
Circuit activity handlers also provide an approach for accessing scoped Blazor services from other non-Blazor dependency injection (DI) scopes. For more information and examples, see:
731731

732732
* <xref:blazor/fundamentals/dependency-injection#access-server-side-blazor-services-from-a-different-di-scope>
733-
* <xref:blazor/security/server/additional-scenarios#access-authenticationstateprovider-in-outgoing-request-middleware>
733+
* <xref:blazor/security/additional-scenarios#access-authenticationstateprovider-in-outgoing-request-middleware>
734734

735735
:::moniker-end
736736

@@ -1414,7 +1414,7 @@ When a circuit ends because a user has disconnected and the framework is cleanin
14141414

14151415
## Server-side circuit handler to capture users for custom services
14161416

1417-
Use a <xref:Microsoft.AspNetCore.Components.Server.Circuits.CircuitHandler> to capture a user from the <xref:Microsoft.AspNetCore.Components.Authorization.AuthenticationStateProvider> and set that user in a service. For more information and example code, see <xref:blazor/security/server/additional-scenarios#circuit-handler-to-capture-users-for-custom-services>.
1417+
Use a <xref:Microsoft.AspNetCore.Components.Server.Circuits.CircuitHandler> to capture a user from the <xref:Microsoft.AspNetCore.Components.Authorization.AuthenticationStateProvider> and set that user in a service. For more information and example code, see <xref:blazor/security/additional-scenarios#circuit-handler-to-capture-users-for-custom-services>.
14181418

14191419
:::moniker range=">= aspnetcore-8.0"
14201420

@@ -1436,8 +1436,8 @@ Use a <xref:Microsoft.AspNetCore.Components.Server.Circuits.CircuitHandler> to c
14361436
* Server-side security documentation
14371437
* <xref:blazor/security/index>
14381438
* <xref:blazor/security/server/index>
1439-
* <xref:blazor/security/server/interactive-server-side-rendering>
1440-
* <xref:blazor/security/server/additional-scenarios>
1439+
* <xref:blazor/security/interactive-server-side-rendering>
1440+
* <xref:blazor/security/additional-scenarios>
14411441
* [Server-side reconnection events and component lifecycle events](xref:blazor/components/lifecycle#blazor-server-reconnection-events)
14421442
* [What is Azure SignalR Service?](/azure/azure-signalr/signalr-overview)
14431443
* [Performance guide for Azure SignalR Service](/azure/azure-signalr/signalr-concept-performance)

0 commit comments

Comments
 (0)