当前位置:网站首页>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)
边栏推荐
- Queue Topic: Recent Requests
- Redis key basic commands
- Dive into how it works together by simulating Vite
- UI自动化测试 App的WebView页面中,当搜索栏无搜索按钮时处理方法
- [CISCN2019 South China Division]Web11
- UE4 通过互动(键盘按键)开门
- 905. Interval selection
- Use Unity to publish APP to Hololens2 without pit tutorial
- Mysql的undo log详解
- UE4 opens door via interaction (keyboard key)
猜你喜欢

Initial solution of the structure

How to discover a valuable GameFi?

Some conventional routines of program development (1)

leetcode-每日一题1403. 非递增顺序的最小子序列(贪心)

今年七夕,「情蔬」比礼物更有爱

Swing有几种常用的事件处理方式?如何监听事件?

2022-08-04T17:50:58.296+0800 ERROR Announcer-3 io.airlift.discovery.client.Announcer appears after successful startup of presto

结构体初解

Acid (ACID) Base (BASE) Principles for Database Design

程序开发的一些常规套路(一)
随机推荐
多御安全浏览器新版下载 | 功能优秀性能出众
UE4 更改组件变量 (以修改第一人称角色模板的最大行走速度和跳跃高度为例)
【Mysql进阶优化篇02】索引失效的10种情况及原理
pyqt5 + socket 实现客户端A经socket服务器中转后主动向客户端B发送文件
[极客大挑战 2019]FinalSQL
测试薪资这么高?刚毕业就20K
The test salary is so high?20K just graduated
不看后悔,appium自动化环境完美搭建
UE4 后期处理体积 (角色受到伤害场景颜色变淡案例)
Event parse tree Drain3 usage and explanation
ffmpeg enumeration decoders, encoders analysis
2022-08-04T17:50:58.296+0800 ERROR Announcer-3 io.airlift.discovery.client.Announcer appears after successful startup of presto
MRTK3 develops Hololens application - gesture drag, rotate, zoom object implementation
Mysql的undo log详解
Android 面试题——如何徒手写一个非阻塞线程安全队列 ConcurrentLinkedQueue?
token, jwt, oauth2, session parsing
MySql的索引学习和使用;(本人觉得足够详细)
[Paper Notes] MapReduce: Simplified Data Processing on Large Clusters
How do newcomers get started and learn software testing?
Kubernetes 网络入门