You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Tang0401 (via GitHub)" <gi...@apache.org> on 2023/02/27 15:13:31 UTC
[GitHub] [cordova-ios] Tang0401 opened a new issue, #1291: one question about CDVAllowList
Tang0401 opened a new issue, #1291:
URL: https://github.com/apache/cordova-ios/issues/1291
# Bug Report
## Problem
### What is expected to happen?
### What does actually happen?
NSRegularExpression* parts = [NSRegularExpression regularExpressionWithPattern:@"^((\\*|[A-Za-z-]+):/?/?)?(((\\*\\.)?[^*/:]+)|\\*)?(:(\\d+))?(/.*)?" options:0 error:nil];
Some schemes cannot be adding into allowlist, for example, com.12306, openapp.jdmobile.
Is thie regularExpression for scheme ((\\*|[A-Za-z-]+)) universial?
## Information
<!-- Include all relevant information that might help understand and reproduce the problem -->
### Command or Code
<!-- What command or code is needed to reproduce the problem? -->
### Environment, Platform, Device
<!-- In what environment, on what platform or on which device are you experiencing the issue? -->
### Version information
<!--
What are relevant versions you are using?
For example:
Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins
Other Frameworks: Ionic Framework and CLI version
Operating System, Android Studio, Xcode etc.
-->
## Checklist
<!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
- [ ] I searched for existing GitHub issues
- [ ] I updated all Cordova tooling to most recent version
- [ ] I included all the necessary information above
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [I] one question about CDVAllowList [cordova-ios]
Posted by "dpogue (via GitHub)" <gi...@apache.org>.
dpogue closed issue #1291: one question about CDVAllowList
URL: https://github.com/apache/cordova-ios/issues/1291
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [I] one question about CDVAllowList [cordova-ios]
Posted by "erisu (via GitHub)" <gi...@apache.org>.
erisu commented on issue #1291:
URL: https://github.com/apache/cordova-ios/issues/1291#issuecomment-1985696238
IMO, the regular expression is not universal. It is more strict on what is allowed as a scheme.
Looking at [O'Reilly - Extracting the Scheme from a URL](https://www.oreilly.com/library/view/regular-expressions-cookbook/9781449327453/ch08s08.html), they suggest to use the following regular expression for matching URL parts.
```
^([a-z][a-z0-9+\-.]*):
```
Using the above regular expression with following test data:
```
http://cordova.apache.org
https://cordova.apache.org
org.apache://cordova.foobar
```
It would identfy that `http`, `https` and `org.apache` are schemes.
In regards to Cordova, I am not sure why a stricter expression was applied.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [I] one question about CDVAllowList [cordova-ios]
Posted by "dpogue (via GitHub)" <gi...@apache.org>.
dpogue closed issue #1291: one question about CDVAllowList
URL: https://github.com/apache/cordova-ios/issues/1291
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org