当前位置:网站首页>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)
边栏推荐
- [CISCN2019 华东南赛区]Web11
- bytebuffer internal structure
- Defect detection (image processing part)
- Static method to get configuration file data
- Paparazzi: Surface Editing by way of Multi-View Image Processing
- Haproxy搭建Web群集
- Redis key basic commands
- 【 8.4 】 source code - [math] [calendar] [delete library 】 【 is not a simple sequence (Bonus) 】
- The test salary is so high?20K just graduated
- The most effective seven performance testing techniques of software testing techniques
猜你喜欢

Industry Status?Why do Internet companies prefer to spend 20k to recruit people rather than raise their salary to retain old employees~
![[论文笔记] MapReduce: Simplified Data Processing on Large Clusters](/img/89/8adef42b0cfd154e6fa7205afaeade.png)
[论文笔记] MapReduce: Simplified Data Processing on Large Clusters

35岁的软件测试工程师,月薪不足2W,辞职又怕找不到工作,该何去何从?

从企业的视角来看,数据中台到底意味着什么?

结构体初解

Solana NFT开发指南

UE4 opens door via interaction (keyboard key)

bytebuffer internal structure

阿里本地生活单季营收106亿,大文娱营收72亿,菜鸟营收121亿

shell脚本:for循环与while循环
随机推荐
How to solve the three major problems of bank data collection, data supplementary recording and index management?
测试薪资这么高?刚毕业就20K
Ali's local life's single-quarter revenue is 10.6 billion, Da Wenyu's revenue is 7.2 billion, and Cainiao's revenue is 12.1 billion
【Mysql进阶优化篇02】索引失效的10种情况及原理
How to find all fields with empty data in sql
2022.8.4-----leetcode.1403
不看后悔,appium自动化环境完美搭建
GC Gaode coordinate and Baidu coordinate conversion
【8.2】代码源 - 【货币系统】【硬币】【新年的问题(数据加强版)】【三段式】
Queue Topic: Recent Requests
A 35-year-old software testing engineer with a monthly salary of less than 2W, resigns and is afraid of not finding a job, what should he do?
Call Alibaba Cloud oss and sms services
Solana NFT开发指南
cross domain solution
多列属性column元素的可见性:display、visibility、opacity、垂直对齐方式:vertical-align、z-index 越大越显示在上层
【树莓派】树莓派调光
Index Mysql in order to optimize paper 02 】 【 10 kinds of circumstances and the principle of failure
Confessing the era of digital transformation, Speed Cloud engraves a new starting point for value
事件解析树Drain3使用方法和解释
DEJA_VU3D - Cesium功能集 之 059-腾讯地图纠偏