Comments (2)
They are really the same ... the first has no capture groups and the second has two .... If the backreferences in the second are not being used then they could be dropped.
from smf.
As Spuds said, the one from Register.php should be used since there are no backreferences being used:
// No funky symbols either.
if (preg_match('~[<>&"\'=\\\]~', preg_replace('~(&#(\\d{1,7}|x[0-9a-fA-F]{1,6});)~', '', $_POST['user'])) != 0)
{
$context['login_errors'] = array($txt['error_invalid_characters_username']);
return;
}
from smf.
Related Issues (20)
- Upgrader: Old protected_alter logic is producing deprecation warnings HOT 2
- Improve error reporting when a loop is detected
- Calendar - events dropped when there are multiple overlapping events HOT 8
- "No newline at end of file" policy HOT 3
- Inconsistent/wrong uses of "forums" HOT 1
- Add Sensitive Parameter attribute HOT 1
- "Awaiting Approval" tab not appearing in the ACP menu
- Remove or unify "sorry" strings HOT 12
- (Incompletely configured) Paid subs errors use language of the user in error log HOT 3
- Attachments are not deleted after uploading a new one. HOT 1
- Posts ending in [@ cause "Uninitialized string offset" errors HOT 1
- Upgrade converting UTF-8 may sometimes convert backup tables HOT 1
- Unable to delete some filtered errors
- Search custom index: log_search_words not built in correct collation HOT 4
- mysqli_prepare can return false HOT 9
- Attachment UI may use wrong units in total attachment file size indicator.
- safe_file_write() doesn't like null for its $backup_file argument
- BBC Code
- Quote selected text does not parse `[member]` BBC HOT 2
- Support List-Unsubscribe header HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smf.