Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cli] Fix HTTPS tunneling for usernames with dot #28692

Merged
merged 2 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
49 changes: 49 additions & 0 deletions apps/fabric-tester/ios/fabrictester/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>CA92.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>C617.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryDiskSpace</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array/>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string></string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array/>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>35F9.1</string>
</array>
</dict>
</array>
<key>NSPrivacyCollectedDataTypes</key>
<array/>
<key>NSPrivacyTracking</key>
<false/>
</dict>
</plist>
2 changes: 2 additions & 0 deletions packages/@expo/cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

### 🐛 Bug fixes

- Fix HTTPS tunneling for accounts with dots in their username. ([#28692](https://github.com/expo/expo/pull/28692) by [@gabrieldonadel](https://github.com/gabrieldonadel))

### 💡 Others

## 0.18.10 — 2024-05-07
Expand Down
3 changes: 2 additions & 1 deletion packages/@expo/cli/src/start/server/AsyncNgrok.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ export class AsyncNgrok {
return [
// NOTE: https://github.com/expo/expo/pull/16556#discussion_r822944286
await this.getProjectRandomnessAsync(),
slugify(username),
// Strip out periods from the username to avoid subdomain issues with SSL certificates.
slugify(username, { remove: /\./ }),
Copy link
Contributor

@wodin wodin May 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that the slugify docs say this:

  • If the value of remove is a regular expression, it should be a character class and only a character class. It should also use the global flag. (For example: /[*+~.()'"!:@]/g.) Otherwise, the remove option might not work as expected.
  • If the value of remove is a string, it should be a single character. Otherwise, the remove option might not work as expected.

So it seems they're saying you should use '.' or /[.]/g

However, I tested /\./ and it seems to work fine! I suppose their recommendation is just a lie to children?

// Use the port to distinguish between multiple tunnels (webpack, metro).
String(this.port),
];
Expand Down