Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Don't use special characters in creation of project auth tokens #1169

Merged
merged 1 commit into from
Aug 1, 2019

Conversation

rijkvanzanten
Copy link
Member

The StringUtils::randomString method had a pool of characters including the ' character. This string would be put inside the config file directly which could potentially conflict in the config file of the newly created project:

[
  'auth_secret' => 'random-token-includes-a-'-and-messes-up-the-string'
]

This PR fixes that by adding a secondary parameter to the randomString util called special_chars that will enable / disable the inclusion of special characters in this string. It's turned on by default so it doesn't change any of the usage elsewhere in the system, while allowing the project creation service to not include special characters.

@rijkvanzanten rijkvanzanten added the bug Something isn't working label Jul 31, 2019
@rijkvanzanten rijkvanzanten self-assigned this Jul 31, 2019
@binal-7span binal-7span merged commit a6c3df8 into develop Aug 1, 2019
@binal-7span binal-7span added this to Done in v2.4.0 Aug 1, 2019
@rijkvanzanten rijkvanzanten deleted the install branch August 1, 2019 22:15
rijkvanzanten pushed a commit that referenced this pull request Aug 7, 2019
* Parent + Nested validation changes (#1138)

* #1121 (#1126)

* Public Role : UserId should be set 0 instead of null

* Change : invalid token

* Issue Fix #1109 (#1146)

* Added file support for 7.0 (Explained) (#1124)

* Bump version to 2.3.0 (#1120)

* Added file support for 7.0 (Explained)

Having `public` in front of `const` completely breaks the application for `PHP 7.0` usage, which broke everything when I pulled origin.

Though I understand `PHP 7.0` isn't officially supported, and that `PHP 7.1+` is, there is no reason to use public alongside const as the default visibility of class constants are public. We might as well provide support where possible if it doesn't hurt.

Explained here:
https://stackoverflow.com/a/51568547

* Issue Fix #1114 (#1128)

* Issue Fix #1114

* Change exception message

* Update .gitignore (#1129)

* Bump version to 2.3.0 (#1120)

* Update .gitignore

* Update .gitignore

* Update .gitignore

* Update .gitignore

* Issue Fix #1125 (#1134)

* Issue Fix #1131 (#1135)

* create thumb for pdf if imagick is available (#1123)

* Bump version to 2.3.0 (#1120)

* create thumb for pdf if imagick is available

* Issue Fix #1109

* Add Special characters in the radom string generator

* Issue Fix #1109

* Remove other option

* Imagick changes

* Issue Fix #1148 (#1152)

* Fix 1149 (#1156)

* Process relation & non relatinal fields sequentially to solve logical operator issue

* Process relation & non relatinal fields sequentially to solve logical operator issue

* Fixed namespace of InvalidLoggerConfigurationException (#1153)

* added array type to schema

* Update logo without page refresh (#1162)

* skipped schema validation for config from api.php

* Resolve the error of validation of primary key (#1166)

* Don't use special characters in creation of project auth tokens (#1169)

* Comment PHP variables in htaccess. (#1145)

* Added file support for 7.0 (Explained) (#1124)

* Bump version to 2.3.0 (#1120)

* Added file support for 7.0 (Explained)

Having `public` in front of `const` completely breaks the application for `PHP 7.0` usage, which broke everything when I pulled origin.

Though I understand `PHP 7.0` isn't officially supported, and that `PHP 7.1+` is, there is no reason to use public alongside const as the default visibility of class constants are public. We might as well provide support where possible if it doesn't hurt.

Explained here:
https://stackoverflow.com/a/51568547

* Issue Fix #1114 (#1128)

* Issue Fix #1114

* Change exception message

* Update .gitignore (#1129)

* Bump version to 2.3.0 (#1120)

* Update .gitignore

* Update .gitignore

* Update .gitignore

* Update .gitignore

* Issue Fix #1125 (#1134)

* Issue Fix #1131 (#1135)

* create thumb for pdf if imagick is available (#1123)

* Bump version to 2.3.0 (#1120)

* create thumb for pdf if imagick is available

* Remove warning of undefined index size (#1140)

* Add thumbnails for PDF. (#1141)

* Remove PHP vaeiable from htaccess.

* Update .htaccess

* Update public/.htaccess

Co-Authored-By: Rijk van Zanten <rijkvanzanten@me.com>

* Issue Fix #1161 (#1165)

* Issue fix #1161

* Check for O2M

* Add option to prevent upsizing contained thumbnails. (#1168)

* Issue Fix #1170 (#1175)

* Release 2.3.1 (#1158)

* Parent + Nested validation changes (#1138)

* #1121 (#1126)

* Public Role : UserId should be set 0 instead of null

* Change : invalid token

* Issue Fix #1109 (#1146)

* Added file support for 7.0 (Explained) (#1124)

* Bump version to 2.3.0 (#1120)

* Added file support for 7.0 (Explained)

Having `public` in front of `const` completely breaks the application for `PHP 7.0` usage, which broke everything when I pulled origin.

Though I understand `PHP 7.0` isn't officially supported, and that `PHP 7.1+` is, there is no reason to use public alongside const as the default visibility of class constants are public. We might as well provide support where possible if it doesn't hurt.

Explained here:
https://stackoverflow.com/a/51568547

* Issue Fix #1114 (#1128)

* Issue Fix #1114

* Change exception message

* Update .gitignore (#1129)

* Bump version to 2.3.0 (#1120)

* Update .gitignore

* Update .gitignore

* Update .gitignore

* Update .gitignore

* Issue Fix #1125 (#1134)

* Issue Fix #1131 (#1135)

* create thumb for pdf if imagick is available (#1123)

* Bump version to 2.3.0 (#1120)

* create thumb for pdf if imagick is available

* Issue Fix #1109

* Add Special characters in the radom string generator

* Issue Fix #1109

* Remove other option

* Imagick changes

* Issue Fix #1148 (#1152)

* Fix 1149 (#1156)

* Process relation & non relatinal fields sequentially to solve logical operator issue

* Process relation & non relatinal fields sequentially to solve logical operator issue

* Fixed namespace of InvalidLoggerConfigurationException (#1153)

* Bump version to v2.3.1

* Merge conflict resolve

* Issue Fix #1170

* Rebase files

* added new config key "ext" for all external config with type ARRAY.
added tests.

* made "ext" key optional

* Issue fix/1176 (#1177)
rijkvanzanten added a commit that referenced this pull request Aug 8, 2019
* Parent + Nested validation changes (#1138)

* Issue Fix #1109 (#1146)

* Added file support for 7.0 (Explained) (#1124)

* Bump version to 2.3.0 (#1120)

* Added file support for 7.0 (Explained)

Having `public` in front of `const` completely breaks the application for `PHP 7.0` usage, which broke everything when I pulled origin.

Though I understand `PHP 7.0` isn't officially supported, and that `PHP 7.1+` is, there is no reason to use public alongside const as the default visibility of class constants are public. We might as well provide support where possible if it doesn't hurt.

Explained here:
https://stackoverflow.com/a/51568547

* Issue Fix #1114 (#1128)

* Issue Fix #1114

* Change exception message

* Update .gitignore (#1129)

* Bump version to 2.3.0 (#1120)

* Update .gitignore

* Update .gitignore

* Update .gitignore

* Update .gitignore

* Issue Fix #1125 (#1134)

* Issue Fix #1131 (#1135)

* create thumb for pdf if imagick is available (#1123)

* Bump version to 2.3.0 (#1120)

* create thumb for pdf if imagick is available

* Issue Fix #1109

* Add Special characters in the radom string generator

* Issue Fix #1109

* Remove other option

* Imagick changes

* Update logo without page refresh (#1162)

* Resolve the error of validation of primary key (#1166)

* Don't use special characters in creation of project auth tokens (#1169)

* Comment PHP variables in htaccess. (#1145)

* Added file support for 7.0 (Explained) (#1124)

* Bump version to 2.3.0 (#1120)

* Added file support for 7.0 (Explained)

Having `public` in front of `const` completely breaks the application for `PHP 7.0` usage, which broke everything when I pulled origin.

Though I understand `PHP 7.0` isn't officially supported, and that `PHP 7.1+` is, there is no reason to use public alongside const as the default visibility of class constants are public. We might as well provide support where possible if it doesn't hurt.

Explained here:
https://stackoverflow.com/a/51568547

* Issue Fix #1114 (#1128)

* Issue Fix #1114

* Change exception message

* Update .gitignore (#1129)

* Bump version to 2.3.0 (#1120)

* Update .gitignore

* Update .gitignore

* Update .gitignore

* Update .gitignore

* Issue Fix #1125 (#1134)

* Issue Fix #1131 (#1135)

* create thumb for pdf if imagick is available (#1123)

* Bump version to 2.3.0 (#1120)

* create thumb for pdf if imagick is available

* Remove warning of undefined index size (#1140)

* Add thumbnails for PDF. (#1141)

* Remove PHP vaeiable from htaccess.

* Update .htaccess

* Update public/.htaccess

Co-Authored-By: Rijk van Zanten <rijkvanzanten@me.com>

* Issue Fix #1161 (#1165)

* Issue fix #1161

* Check for O2M

* Add option to prevent upsizing contained thumbnails. (#1168)

* Issue Fix #1170 (#1175)

* Release 2.3.1 (#1158)

* Parent + Nested validation changes (#1138)

* #1121 (#1126)

* Public Role : UserId should be set 0 instead of null

* Change : invalid token

* Issue Fix #1109 (#1146)

* Added file support for 7.0 (Explained) (#1124)

* Bump version to 2.3.0 (#1120)

* Added file support for 7.0 (Explained)

Having `public` in front of `const` completely breaks the application for `PHP 7.0` usage, which broke everything when I pulled origin.

Though I understand `PHP 7.0` isn't officially supported, and that `PHP 7.1+` is, there is no reason to use public alongside const as the default visibility of class constants are public. We might as well provide support where possible if it doesn't hurt.

Explained here:
https://stackoverflow.com/a/51568547

* Issue Fix #1114 (#1128)

* Issue Fix #1114

* Change exception message

* Update .gitignore (#1129)

* Bump version to 2.3.0 (#1120)

* Update .gitignore

* Update .gitignore

* Update .gitignore

* Update .gitignore

* Issue Fix #1125 (#1134)

* Issue Fix #1131 (#1135)

* create thumb for pdf if imagick is available (#1123)

* Bump version to 2.3.0 (#1120)

* create thumb for pdf if imagick is available

* Issue Fix #1109

* Add Special characters in the radom string generator

* Issue Fix #1109

* Remove other option

* Imagick changes

* Issue Fix #1148 (#1152)

* Fix 1149 (#1156)

* Process relation & non relatinal fields sequentially to solve logical operator issue

* Process relation & non relatinal fields sequentially to solve logical operator issue

* Fixed namespace of InvalidLoggerConfigurationException (#1153)

* Bump version to v2.3.1

* Merge conflict resolve

* Issue Fix #1170

* Rebase files

* Issue fix/1176 (#1177)

* added array type to schema (#1163)

* Parent + Nested validation changes (#1138)

* #1121 (#1126)

* Public Role : UserId should be set 0 instead of null

* Change : invalid token

* Issue Fix #1109 (#1146)

* Added file support for 7.0 (Explained) (#1124)

* Bump version to 2.3.0 (#1120)

* Added file support for 7.0 (Explained)

Having `public` in front of `const` completely breaks the application for `PHP 7.0` usage, which broke everything when I pulled origin.

Though I understand `PHP 7.0` isn't officially supported, and that `PHP 7.1+` is, there is no reason to use public alongside const as the default visibility of class constants are public. We might as well provide support where possible if it doesn't hurt.

Explained here:
https://stackoverflow.com/a/51568547

* Issue Fix #1114 (#1128)

* Issue Fix #1114

* Change exception message

* Update .gitignore (#1129)

* Bump version to 2.3.0 (#1120)

* Update .gitignore

* Update .gitignore

* Update .gitignore

* Update .gitignore

* Issue Fix #1125 (#1134)

* Issue Fix #1131 (#1135)

* create thumb for pdf if imagick is available (#1123)

* Bump version to 2.3.0 (#1120)

* create thumb for pdf if imagick is available

* Issue Fix #1109

* Add Special characters in the radom string generator

* Issue Fix #1109

* Remove other option

* Imagick changes

* Issue Fix #1148 (#1152)

* Fix 1149 (#1156)

* Process relation & non relatinal fields sequentially to solve logical operator issue

* Process relation & non relatinal fields sequentially to solve logical operator issue

* Fixed namespace of InvalidLoggerConfigurationException (#1153)

* added array type to schema

* Update logo without page refresh (#1162)

* skipped schema validation for config from api.php

* Resolve the error of validation of primary key (#1166)

* Don't use special characters in creation of project auth tokens (#1169)

* Comment PHP variables in htaccess. (#1145)

* Added file support for 7.0 (Explained) (#1124)

* Bump version to 2.3.0 (#1120)

* Added file support for 7.0 (Explained)

Having `public` in front of `const` completely breaks the application for `PHP 7.0` usage, which broke everything when I pulled origin.

Though I understand `PHP 7.0` isn't officially supported, and that `PHP 7.1+` is, there is no reason to use public alongside const as the default visibility of class constants are public. We might as well provide support where possible if it doesn't hurt.

Explained here:
https://stackoverflow.com/a/51568547

* Issue Fix #1114 (#1128)

* Issue Fix #1114

* Change exception message

* Update .gitignore (#1129)

* Bump version to 2.3.0 (#1120)

* Update .gitignore

* Update .gitignore

* Update .gitignore

* Update .gitignore

* Issue Fix #1125 (#1134)

* Issue Fix #1131 (#1135)

* create thumb for pdf if imagick is available (#1123)

* Bump version to 2.3.0 (#1120)

* create thumb for pdf if imagick is available

* Remove warning of undefined index size (#1140)

* Add thumbnails for PDF. (#1141)

* Remove PHP vaeiable from htaccess.

* Update .htaccess

* Update public/.htaccess

Co-Authored-By: Rijk van Zanten <rijkvanzanten@me.com>

* Issue Fix #1161 (#1165)

* Issue fix #1161

* Check for O2M

* Add option to prevent upsizing contained thumbnails. (#1168)

* Issue Fix #1170 (#1175)

* Release 2.3.1 (#1158)

* Parent + Nested validation changes (#1138)

* #1121 (#1126)

* Public Role : UserId should be set 0 instead of null

* Change : invalid token

* Issue Fix #1109 (#1146)

* Added file support for 7.0 (Explained) (#1124)

* Bump version to 2.3.0 (#1120)

* Added file support for 7.0 (Explained)

Having `public` in front of `const` completely breaks the application for `PHP 7.0` usage, which broke everything when I pulled origin.

Though I understand `PHP 7.0` isn't officially supported, and that `PHP 7.1+` is, there is no reason to use public alongside const as the default visibility of class constants are public. We might as well provide support where possible if it doesn't hurt.

Explained here:
https://stackoverflow.com/a/51568547

* Issue Fix #1114 (#1128)

* Issue Fix #1114

* Change exception message

* Update .gitignore (#1129)

* Bump version to 2.3.0 (#1120)

* Update .gitignore

* Update .gitignore

* Update .gitignore

* Update .gitignore

* Issue Fix #1125 (#1134)

* Issue Fix #1131 (#1135)

* create thumb for pdf if imagick is available (#1123)

* Bump version to 2.3.0 (#1120)

* create thumb for pdf if imagick is available

* Issue Fix #1109

* Add Special characters in the radom string generator

* Issue Fix #1109

* Remove other option

* Imagick changes

* Issue Fix #1148 (#1152)

* Fix 1149 (#1156)

* Process relation & non relatinal fields sequentially to solve logical operator issue

* Process relation & non relatinal fields sequentially to solve logical operator issue

* Fixed namespace of InvalidLoggerConfigurationException (#1153)

* Bump version to v2.3.1

* Merge conflict resolve

* Issue Fix #1170

* Rebase files

* added new config key "ext" for all external config with type ARRAY.
added tests.

* made "ext" key optional

* Issue fix/1176 (#1177)

* Issue fix #1179 (#1181)

* Release v2.4.0
itsmerhp pushed a commit to itsmerhp/api that referenced this pull request Aug 31, 2019
* Parent + Nested validation changes (directus#1138)

* directus#1121 (directus#1126)

* Public Role : UserId should be set 0 instead of null

* Change : invalid token

* Issue Fix directus#1109 (directus#1146)

* Added file support for 7.0 (Explained) (directus#1124)

* Bump version to 2.3.0 (directus#1120)

* Added file support for 7.0 (Explained)

Having `public` in front of `const` completely breaks the application for `PHP 7.0` usage, which broke everything when I pulled origin.

Though I understand `PHP 7.0` isn't officially supported, and that `PHP 7.1+` is, there is no reason to use public alongside const as the default visibility of class constants are public. We might as well provide support where possible if it doesn't hurt.

Explained here:
https://stackoverflow.com/a/51568547

* Issue Fix directus#1114 (directus#1128)

* Issue Fix directus#1114

* Change exception message

* Update .gitignore (directus#1129)

* Bump version to 2.3.0 (directus#1120)

* Update .gitignore

* Update .gitignore

* Update .gitignore

* Update .gitignore

* Issue Fix directus#1125 (directus#1134)

* Issue Fix directus#1131 (directus#1135)

* create thumb for pdf if imagick is available (directus#1123)

* Bump version to 2.3.0 (directus#1120)

* create thumb for pdf if imagick is available

* Issue Fix directus#1109

* Add Special characters in the radom string generator

* Issue Fix directus#1109

* Remove other option

* Imagick changes

* Issue Fix directus#1148 (directus#1152)

* Fix 1149 (directus#1156)

* Process relation & non relatinal fields sequentially to solve logical operator issue

* Process relation & non relatinal fields sequentially to solve logical operator issue

* Fixed namespace of InvalidLoggerConfigurationException (directus#1153)

* added array type to schema

* Update logo without page refresh (directus#1162)

* skipped schema validation for config from api.php

* Resolve the error of validation of primary key (directus#1166)

* Don't use special characters in creation of project auth tokens (directus#1169)

* Comment PHP variables in htaccess. (directus#1145)

* Added file support for 7.0 (Explained) (directus#1124)

* Bump version to 2.3.0 (directus#1120)

* Added file support for 7.0 (Explained)

Having `public` in front of `const` completely breaks the application for `PHP 7.0` usage, which broke everything when I pulled origin.

Though I understand `PHP 7.0` isn't officially supported, and that `PHP 7.1+` is, there is no reason to use public alongside const as the default visibility of class constants are public. We might as well provide support where possible if it doesn't hurt.

Explained here:
https://stackoverflow.com/a/51568547

* Issue Fix directus#1114 (directus#1128)

* Issue Fix directus#1114

* Change exception message

* Update .gitignore (directus#1129)

* Bump version to 2.3.0 (directus#1120)

* Update .gitignore

* Update .gitignore

* Update .gitignore

* Update .gitignore

* Issue Fix directus#1125 (directus#1134)

* Issue Fix directus#1131 (directus#1135)

* create thumb for pdf if imagick is available (directus#1123)

* Bump version to 2.3.0 (directus#1120)

* create thumb for pdf if imagick is available

* Remove warning of undefined index size (directus#1140)

* Add thumbnails for PDF. (directus#1141)

* Remove PHP vaeiable from htaccess.

* Update .htaccess

* Update public/.htaccess

Co-Authored-By: Rijk van Zanten <rijkvanzanten@me.com>

* Issue Fix directus#1161 (directus#1165)

* Issue fix directus#1161

* Check for O2M

* Add option to prevent upsizing contained thumbnails. (directus#1168)

* Issue Fix #1170 (directus#1175)

* Release 2.3.1 (directus#1158)

* Parent + Nested validation changes (directus#1138)

* directus#1121 (directus#1126)

* Public Role : UserId should be set 0 instead of null

* Change : invalid token

* Issue Fix directus#1109 (directus#1146)

* Added file support for 7.0 (Explained) (directus#1124)

* Bump version to 2.3.0 (directus#1120)

* Added file support for 7.0 (Explained)

Having `public` in front of `const` completely breaks the application for `PHP 7.0` usage, which broke everything when I pulled origin.

Though I understand `PHP 7.0` isn't officially supported, and that `PHP 7.1+` is, there is no reason to use public alongside const as the default visibility of class constants are public. We might as well provide support where possible if it doesn't hurt.

Explained here:
https://stackoverflow.com/a/51568547

* Issue Fix directus#1114 (directus#1128)

* Issue Fix directus#1114

* Change exception message

* Update .gitignore (directus#1129)

* Bump version to 2.3.0 (directus#1120)

* Update .gitignore

* Update .gitignore

* Update .gitignore

* Update .gitignore

* Issue Fix directus#1125 (directus#1134)

* Issue Fix directus#1131 (directus#1135)

* create thumb for pdf if imagick is available (directus#1123)

* Bump version to 2.3.0 (directus#1120)

* create thumb for pdf if imagick is available

* Issue Fix directus#1109

* Add Special characters in the radom string generator

* Issue Fix directus#1109

* Remove other option

* Imagick changes

* Issue Fix directus#1148 (directus#1152)

* Fix 1149 (directus#1156)

* Process relation & non relatinal fields sequentially to solve logical operator issue

* Process relation & non relatinal fields sequentially to solve logical operator issue

* Fixed namespace of InvalidLoggerConfigurationException (directus#1153)

* Bump version to v2.3.1

* Merge conflict resolve

* Issue Fix #1170

* Rebase files

* added new config key "ext" for all external config with type ARRAY.
added tests.

* made "ext" key optional

* Issue fix/1176 (directus#1177)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
No open projects
v2.4.0
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants