
Security News
Next.js Patches Critical Middleware Vulnerability (CVE-2025-29927)
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.
xyz.icetang.lib.icemmand:icemmand-core
Advanced tools
기존 Paper는 tabComplete가 자동화되지 않았습니다.
따라서 아래와 같이 코드를 작성해야만 했습니다.
class CommandDispatcher : CommandExecutor, TabCompleter {
...
override fun onCommand(...) {
val commandName = args[0]
if ("first".equals(commandName, true)) {
// first 명령 처리
} else if ("second".equals(commandName, true)) {
// second 명령 처리
} else {
// Error
}
// when 문으로도 구현 가능
}
override fun onTabComplete(...) {
val commandName = args[0]
if ("first".startsWith(commandName, true)) {
// first 명령어 제안
} else if ("second".startsWith(commandName, true)) {
// second 명령어 제안
}
}
}
...
그러나 2024년 5월 13일, Paper에 brigadier가 공식 도입되었습니다.
icemmand는 brigadier를 사용하여 명령어를 쉽게 작성할 수 있도록 도와줍니다.
아래와 같은 명령 체계가 있다고 생각해봅시다.
다음 코드는 icemmand의 DSL을 사용한 코드입니다.
// in JavaPlugin
icemmand {
register("user") {
then("create") {
then("name" to string()) { // "name"이라는 이름의 String을 요청합니다.
executes { context ->
val name: String by context
createUser(name) // 명령어 실행 함수를 통해 실행
}
}
}
// 빠른 명령 작성 - then 함수와 동일
"modify"("user" to dynamic { ... }) { // 동적 인수를 요청합니다.
"name"("newName" to string()) {
executes { context ->
val user: User by context
val newName: String = it["newName"]
setUserName(user, newName)
}
}
"tag"("newTag" to string()) {
executes {
// 함수 인수에 의한 타입 추론
setUserTag(it["user"], it["newTag"])
}
}
}
}
}
brigadier와 거의 동일한 문법을 이용하나, 가독성이 더욱 좋은 코드가 완성되었습니다.
repositories {
mavenCentral()
}
dependencies {
compileOnly("xyz.icetang.lib:icemmand-api:<version>")
}
name: ...
version: ...
main: ...
libraries:
- xyz.icetang.lib:icemmand-core:<version>
FAQs
Unknown package
We found that xyz.icetang.lib.icemmand:icemmand-core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.
Security News
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
Product
Socket, the leader in open source security, is now available on Google Cloud Marketplace for simplified procurement and enhanced protection against supply chain attacks.