Skip to content

Commit 8b74cf3

Browse files
committed
Update examples in anti-request-forgery documentation to use a consistent domain format
1 parent b31b0e5 commit 8b74cf3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

aspnetcore/security/anti-request-forgery.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ In addition to the scenario where the user selects the button to submit the form
4040

4141
These alternative scenarios don't require any action or input from the user other than initially visiting the malicious site.
4242

43-
Using HTTPS doesn't prevent a CSRF attack. The malicious site can send an `https://www.good-banking-site.com/` request as easily as it can send an insecure request.
43+
Using HTTPS doesn't prevent a CSRF attack. The malicious site can send `https://www.good-banking-site.example.com/` a request just as easily as it can send an insecure request.
4444

4545
Some attacks target endpoints that respond to GET requests, in which case an image tag can be used to perform the action. This form of attack is common on forum sites that permit images but block JavaScript. Apps that change state on GET requests, where variables or resources are altered, are vulnerable to malicious attacks. **GET requests that change state are insecure. A best practice is to never change state on a GET request.**
4646

@@ -359,7 +359,7 @@ In addition to the scenario where the user selects the button to submit the form
359359

360360
These alternative scenarios don't require any action or input from the user other than initially visiting the malicious site.
361361

362-
Using HTTPS doesn't prevent a CSRF attack. The malicious site can send an `https://www.good-banking-site.com/` request just as easily as it can send an insecure request.
362+
Using HTTPS doesn't prevent a CSRF attack. The malicious site can send `https://www.good-banking-site.example.com/` a request just as easily as it can send an insecure request.
363363

364364
Some attacks target endpoints that respond to GET requests, in which case an image tag can be used to perform the action. This form of attack is common on forum sites that permit images but block JavaScript. Apps that change state on GET requests, where variables or resources are altered, are vulnerable to malicious attacks. **GET requests that change state are insecure. A best practice is to never change state on a GET request.**
365365

@@ -635,7 +635,7 @@ In addition to the scenario where the user selects the button to submit the form
635635

636636
These alternative scenarios don't require any action or input from the user other than initially visiting the malicious site.
637637

638-
Using HTTPS doesn't prevent a CSRF attack. The malicious site can send an `https://www.good-banking-site.com/` request just as easily as it can send an insecure request.
638+
Using HTTPS doesn't prevent a CSRF attack. The malicious site can send `https://www.good-banking-site.example.com/` a request just as easily as it can send an insecure request.
639639

640640
Some attacks target endpoints that respond to GET requests, in which case an image tag can be used to perform the action. This form of attack is common on forum sites that permit images but block JavaScript. Apps that change state on GET requests, where variables or resources are altered, are vulnerable to malicious attacks. **GET requests that change state are insecure. A best practice is to never change state on a GET request.**
641641

@@ -887,7 +887,7 @@ In addition to the scenario where the user selects the button to submit the form
887887

888888
These alternative scenarios don't require any action or input from the user other than initially visiting the malicious site.
889889

890-
Using HTTPS doesn't prevent a CSRF attack. The malicious site can send an `https://www.good-banking-site.com/` request just as easily as it can send an insecure request.
890+
Using HTTPS doesn't prevent a CSRF attack. The malicious site can send `https://www.good-banking-site.example.com/` a request just as easily as it can send an insecure request.
891891

892892
Some attacks target endpoints that respond to GET requests, in which case an image tag can be used to perform the action. This form of attack is common on forum sites that permit images but block JavaScript. Apps that change state on GET requests, where variables or resources are altered, are vulnerable to malicious attacks. **GET requests that change state are insecure. A best practice is to never change state on a GET request.**
893893

aspnetcore/security/anti-request-forgery/samples_snapshot/vulnerable-form.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<h1>Congratulations! You're a Winner!</h1>
2-
<form action="https://good-banking-site.com/api/account" method="post">
2+
<form action="https://www.good-banking-site.example.com/api/account" method="post">
33
<input type="hidden" name="Transaction" value="withdraw" />
44
<input type="hidden" name="Amount" value="1000000" />
55
<input type="submit" value="Click to collect your prize!" />

0 commit comments

Comments
 (0)