Skip to content

Instantly share code, notes, and snippets.

View Venthe's full-sized avatar
🏠
Working from home

Jacek Lipiec Venthe

🏠
Working from home
View GitHub Profile
@Venthe
Venthe / GerritXSSIRemover.java
Created March 12, 2024 00:57
XSSI + ByteBuddy
package eu.venthe.pipeline.orchestrator;
import eu.venthe.pipeline.gerrit.invoker.ApiClient;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import net.bytebuddy.ByteBuddy;
import net.bytebuddy.dynamic.loading.ClassLoadingStrategy;
import net.bytebuddy.implementation.MethodDelegation;
import net.bytebuddy.implementation.bind.annotation.AllArguments;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.concurrent.Callable;
/**
* Service which allows any arbitrary code to run on new transaction.
*/
@Service