New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
findOne ignore invalid parameter instead of throw an error #2690
Comments
Same here on version 0.2.9, I believe it happen in all the find, quite a security issue Update: the problem is inside the querybuilder, it uses findColumnsWithPropertyPath which ignore the column if not found, but seems to affect a lot of other place if want to fix |
found in typeorm/src/metadata/EntityMetadata.ts master
Since we are using typeorm I believe type safety and result correctness is what we care, |
I think we can throw an exception in the case if we find not exist column. |
Closing in favor of #3416 |
Issue type:
[ ] question
[x] bug report
[ ] feature request
[ ] documentation issue
Database system/driver:
[ ]
cordova
[ ]
mongodb
[ ]
mssql
[x ]
mysql
/mariadb
[ ]
oracle
[ ]
postgres
[ ]
sqlite
[ ]
sqljs
[ ]
react-native
[ ]
expo
TypeORM version:
[x]
latest
[ ]
@next
[ ]
0.x.x
(or put your version here)Steps to reproduce or a small repository showing the problem:
Hello, I have entity
Which alowed map files to folders. One file could be in many folders.
But I have done typing error "banch" instead "bRanch" when retrieving data:
but this found first result and ingnored invalid (typing error) parameter. I thing it shoul throw error like "Unknown column 'banchId' in 'where clause'! "
The text was updated successfully, but these errors were encountered: