Brown
ae7c5b095b
Fix #3712 - allow taints to be suppressed with @psalm-suppress
2020-07-01 23:23:45 -04:00
Brown
13fc8a75fd
Allow taints to flow where no return type exists
...
Fixes #3652
2020-06-23 15:52:19 -04:00
Brown
e8be2c500e
Support taint flows in more functions
2020-06-22 17:53:03 -04:00
Brown
02e8313c39
Allow taintedness to propagate to some stubbed methods
2020-06-21 18:07:39 -04:00
Brown
dc83c2e2fc
Add annotation for taint sources
2020-06-21 00:58:56 -04:00
Brown
f21d3a8346
Remove html and sql taints for simple preg_replace patterns
2020-06-20 23:11:42 -04:00
Ilija Tovilo
2f646d29db
Fix #3607 - constant string class reference with leading backslash ( #3612 )
2020-06-19 18:02:39 -04:00
Brown
49f0592794
Improve tracking of array taints
2020-06-18 18:48:19 -04:00
Brown
03e9649d49
Fix tainting of function calls absent taintable params
2020-06-15 20:59:48 -04:00
Matthew Brown
081a284759
Fix #3567 - remember which variables a callable sets byref in use
2020-06-14 11:58:50 -04:00
Matthew Brown
a49a0e5650
Fix #3551 - count method can be impure
2020-06-14 11:06:53 -04:00
Brown
a4aa44494f
Fix #3519 - prevent empty callable string
2020-06-04 15:40:53 -04:00
Brown
ecb179c784
Migrate min/max function calls back to CallMap
2020-05-26 12:28:56 -04:00
Brown
953be61cf2
Allow limiting connected taint paths
2020-05-25 23:28:11 -04:00
Brown
118b700436
Simplify sink mapping for internal calls
2020-05-25 13:10:06 -04:00
Brown
63c3678ae5
Improve property location resolution
2020-05-22 12:33:38 -04:00
Matthew Brown
187b944680
Add faster taint analysis
2020-05-22 12:33:29 -04:00
Brown
0b2da18f1e
Break up StatementsAnalyzer
2020-05-19 12:56:30 -04:00
Brown
8e5b330c5a
Break apart CallAnalyzer
2020-05-18 22:57:00 -04:00
Brown
5ee1487a01
Make ExpressionAnalyzer more beautiful
2020-05-18 15:13:27 -04:00
Brown
111303d913
Add non-empty-lowercase-string type
2020-05-15 10:18:05 -04:00
Brown
0d5d7c8938
Add null check
2020-05-11 11:56:07 -04:00
Brown
291018034b
Remove unnecessary PHP code
2020-05-11 11:36:50 -04:00
Brown
8f2f2617d4
Improve refactor
2020-05-10 22:45:01 -04:00
Brown
5f4d162dd5
Break out type expander into separate class
2020-05-10 22:39:18 -04:00
Brown
2d5c2a9dd1
Fix #3324 - prevent crash asserting on possibly-undefined variable
2020-05-08 14:21:10 -04:00
Matthew Brown
da5e8a4324
Increase type coverage for projects that use assert after mixed
2020-05-02 14:55:30 -04:00
Brown
07e5250292
Fix #3273 - add support for func_num_args() in conditional type
2020-05-01 16:02:53 -04:00
Brown
a402d4598b
Define with single argument should not trigger a notice
...
Fixes #3254
2020-04-28 14:43:12 -04:00
Brown
f91e94b64e
Make sure to remember correct positions of @var references
2020-04-27 00:05:20 -04:00
Brown
067104e170
Fix #3084 - keep track of upper and lower bounds of inferred template types
2020-04-07 00:13:56 -04:00
Matthew Brown
194f02507d
Allow conditional types to reference class constants
2020-03-29 13:37:37 -04:00
Matthew Brown
5ad55ae693
Fix type inference on simple conditional function calls
2020-03-29 10:42:57 -04:00
Matthew Brown
e85d22f004
Fix #3033 - allow __invoke on unions with non-objects
2020-03-28 23:41:05 -04:00
Brown
971ae50bea
Do prep work for #3024 - improve handling of absent class references
2020-03-26 12:35:27 -04:00
Matthew Brown
951b943c38
Fix #2981 - check that class exists before making it a phantom
2020-03-17 15:04:50 -04:00
Matthew Brown
c6a5781e78
Break apart FunctionCallAnalyzer::analyze method
2020-03-12 11:05:50 -04:00
Brown
ea0a670230
Flesh out class constants in function call return type
...
Fixes #2884
2020-02-26 17:28:44 -05:00
Matthew Brown
1abece4f7c
Use more accurate types
2020-02-23 17:03:27 -05:00
Matthew Brown
1c218c020e
Fix #1684 - detect error in assertion on return type of direct call
2020-02-22 10:41:57 -05:00
Matthew Brown
653353709a
Use MethodIdentifier object instead of string
2020-02-14 20:54:26 -05:00
Matthew Brown
422bd25f04
Maybe fix indentation
2020-02-13 19:33:47 -05:00
Matthew Brown
95e1bc0c48
Fix line breaks
2020-02-13 18:32:40 -05:00
Brown
1c42875179
Support lowercase-string and warn about unnecessary calls to strtolower
2020-02-13 16:38:58 -05:00
Philip Hofstetter
395cf587d3
add plugin hook to be called after every function call
...
compared to AfterFunctionCallAnalysisInterface which gets only called
after a call to a function declared within the project, a plugin
implementing AfterEveryFunctionCallAnalysisInterface will get called for
every function call, including calls of PHP builtins.
On the other hand, this interface doesn't allow modification of the code
nor tweaking the return type, but it's still useful for accounting
purposes and for depreacting calls to PHP builtins
this fixes #2804
2020-02-13 09:10:24 -05:00
Brown
89a0b101e4
Fix #2784 - no crash when get_class arg is mixed
2020-02-10 14:44:33 -05:00
Matthew Brown
3559fdd6b3
Fix #2742 - prevent paradoxes in assert calls
2020-02-09 11:42:41 -05:00
Matthew Brown
4de6f5c4ec
Fix #2442 - using asserting after a MixedAssignment
removes that error
2020-02-08 23:01:45 -05:00
Brown
54efbbe831
Fix bad assertion
2020-02-06 16:32:26 -05:00
Brown
9af12932b5
Add slash
2020-02-06 15:09:34 -05:00