I had a similar issue when I bought my trailer "new to me." The wiring harness was too short, and it'd unplug if I made a sharp right turn. The trailer was 700 miles from home.
One would think they would make a simple 7-pin extender plug....like an 18" long wire with a male and female end that you'd just plug in to the truck and to the trailer and happy motor it down the road. Well, I've not seen that they do.
I went to a Camping World that had literally opened just that day looking for one. No dice. So, I bought a piece of wire, a plug, some connectors and a bunch of electrical tape and I made one up right there in the parking lot. I still have it in case I ever need it again, but it got me home safe and sound. Once home, I modified the one on the trailer to be about a foot longer and it's been fine ever since. Turns out my trailer ('87 Avion 34-X) had a 9-pin connector and the PO had it wired wrong to the 7-pin he had on there. I was lucky to get it home in one piece and not short out my truck or cause a fire. Anyway, rewired it correctly and all is well.
If you have time before going to get it, you could make up such a wire yourself very easily.
Best of luck,