Currently we are connecting this repo up to translation templates, that then automatically translate the names to the user's language setting. This creates a better end-user experience, below is a quick example:
I haven't checked the deeper names in the repo if there are anymore non-extended Latin or foreign languages present, for example with the Device details - if there are any non-English names present in the repo. The rest can be externally normalized.
Changing everything to English would give two main advantages:
Allow automatic translation servicing to process the data.
Make it easier and safer for developers to sanitize the data before saving it to say a database as an example.
With regards to security, allowing pretty much any character in this repo is a bit of a nightmare, there's nothing to stop bad actors from adding dirty user agents containing illegal characters, such as upside down characters, or corrupted characters such as this example:
Corrupt data going into this repo could help create a DDOS attack and screw up all the php preg_match by making the results take several seconds to process and then flooding the server with tons of requests!
Also if all the results outputted were from the non-extended latin character set only, then it would make life easier to sanitize the data and protect databases storing the data etc.
@NielsLeenheer @mariotsi
Currently we are connecting this repo up to translation templates, that then automatically translate the names to the user's language setting. This creates a better end-user experience, below is a quick example:
English Yaml File:
Chinese Yaml File:
etc. for any language file.
The current issue is that there are two lines of code with different languages, see here:
https://github.com/WhichBrowser/Parser-PHP/blob/da24adc4f4f26002673d236e69b91a10f2fd594c/data/applications-browsers.php#L350
Would be great to change it to it's English name of:
Note: There is an English
surf
and Chinesesurf
browser - see https://github.com/WhichBrowser/Parser-PHP/pull/332This would make the following three files all English:
https://github.com/WhichBrowser/Parser-PHP/blob/master/data/applications-bots.php
https://github.com/WhichBrowser/Parser-PHP/blob/master/data/applications-browsers.php
https://github.com/WhichBrowser/Parser-PHP/blob/master/data/applications-others.php
Device
details - if there are any non-English names present in the repo. The rest can be externally normalized.Would be:
Changing everything to English would give two main advantages:
Allow automatic translation servicing to process the data.
Make it easier and safer for developers to
sanitize
the data before saving it to say a database as an example.With regards to security, allowing pretty much any character in this repo is a bit of a nightmare, there's nothing to stop bad actors from adding dirty user agents containing illegal characters, such as upside down characters, or corrupted characters such as this example:
Corrupt data going into this repo could help create a DDOS attack and screw up all the php
preg_match
by making the results take several seconds to process and then flooding the server with tons of requests!Also if all the results outputted were from the
non-extended latin character set only
, then it would make life easier tosanitize
the data and protect databases storing the data etc.Look forward to the admins views on this matter.