当前位置:网站首页>Qixi Festival earn badges
Qixi Festival earn badges
2022-08-05 04:00:00 【step on step from step on】
The Chinese Valentine's Day is coming!It's time to show the romance of programmers!How are you going to show your love to someone you love?Flower gift?Code confession?Or creative DIY?Or... whatever form, come and show us!
Record the days we walked together
Speaking of single people are not worthy, write code quietly, and bugs are waiting for you. What are you going to do on Qixi Festival? Of course, programmers have to work overtime.After the work is done, the code written can not be reused, and it is not only a view, forget it, it is not a matter of learning the technical documentation, this is life.
Speaking of you want an object,,,,,,,,, okay, I'll give you a new object(); If you want a good figure and good looks, forget it, I'm embarrassed to write it in the constructor.
Speaking of now, it's easy to make an object. You don't have to create a new one yourself, you can just take it directly in the container (just think about it), it's really that simple, and there are places for isolation.No matter how to communicate, by the way, don't we have the container of the whole country.It's really not possible to communicate directly on the phone.Or more advanced communication, you know.Pull away.
Now I like to use middlemen, but it is really easy to use ha,,,,,,,, ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha ha now.
I'm talking about Sa, I don't know, I just wrote it out, this article is completely a badge of water hahaha.
Creative code confession
Sprinkle dog food in the way of programmers, professional and romantic, and worth having!
Let's write a little bit.
1.sql injection official point
SQL injection means web application does not judge the legitimacy of the user input data or the filtering is not strict, the attacker can add a pre-defined query statement in the web application by addingAdditional SQL statement, inIllegal operations are implemented without the administrator's knowledge to achieve deceptionDatabase Server executes any unauthorized query to further obtain corresponding data information.
In my opinion, those hackers at nb point are doing things, hijacking and replacing, adding spaces, and they can still be executed successfully in the database.
So there are two solutions
Placeholder, check if there is more
We all know that placeholders are also the easiest way, but there is a disadvantage that single quotation marks are automatically added, which is ok for normal conditions
For the field or group by or database name is not enough, then how to do it, of course, use the security framework to verify the data and strictly limit the user input to only contain a-zA-Z0-9_-.
character This will ensure security,
In fact, you can write it yourself and use the SecurityUtil.trimSql of the security framework to strictly limit the data, and this thing must be done in the place where sql injection is required. You can do this in some java code. It is also useless and may be hijacked., that is, in mybatis
${@ [email protected](filde)}
That's it.
The solution is much older, but I will introduce it later,
2. What is the locking problem?
Ordinary locks lock the current thread. For the granularity, like jdk, these are the granularity of the current thread, which cannot be refined. If you want to make the granularity smaller, we can use a custom lock to controlA field blocks the current thread and stores the data that needs to be blocked by an intermediate storage tool.And the fields are not the same whether the thread can pass.Then you can create a lock based on your business.
This field can be placed in the middleware or in the database at will.
The principle is the same.And then the specific implementation, I still don't write it for the time being.This article is for the water badge (mainly because there is not so much time for the time being, I will introduce it in detail later in a special article)
边栏推荐
- Redis1:Redis介绍、Redis基本特性、关系型数据库、非关系型数据库、数据库发展阶段
- Some conventional routines of program development (1)
- 36-Jenkins-Job迁移
- C+ +核心编程
- Developing Hololens encountered The type or namespace name 'HandMeshVertex' could not be found..
- [CISCN2019 华东南赛区]Web11
- Ffmpeg - sources analysis
- [BJDCTF2020]EasySearch
- XMjs cross-domain problem solving
- Solana NFT开发指南
猜你喜欢
iMedicalLIS listener (2)
10 years of testing experience, worthless in the face of the biological age of 35
UE4 opens doors with overlapping events
今年七夕,「情蔬」比礼物更有爱
Increasing leetcode - a daily topic 1403. The order of the boy sequence (greed)
Use Unity to publish APP to Hololens2 without pit tutorial
银行数据采集,数据补录与指标管理3大问题如何解决?
The most effective seven performance testing techniques of software testing techniques
[Paper Notes] MapReduce: Simplified Data Processing on Large Clusters
shell脚本:for循环与while循环
随机推荐
Android interview question - how to write with his hands a non-blocking thread safe queue ConcurrentLinkedQueue?
MRTK3 develops Hololens application - gesture drag, rotate, zoom object implementation
不看后悔,appium自动化环境完美搭建
In the WebView page of the UI automation test App, the processing method when the search bar has no search button
工业级远距离无线传输装置的功能有哪些?
国学*周易*梅花易数 代码实现效果展示 - 梅花心易
【背包九讲——01背包问题】
Growth-based checkerboard corner detection method
如何解决复杂的分销分账问题?
Burp installation and proxy settings
Bosses, I noticed that a mysql CDC connector parameters scan. The incremental. Sna
The most effective seven performance testing techniques of software testing techniques
markdown如何换行——md文件
36-Jenkins-Job Migration
Redis key基本命令
[论文笔记] MapReduce: Simplified Data Processing on Large Clusters
第一次性能测试实践,有“亿”点点紧张
[MRCTF2020]PYWebsite
DNS被劫持如何处理?
Defect detection (image processing part)