text
stringlengths
14
100k
source
stringclasses
1 value
repo
stringclasses
810 values
language
stringclasses
13 values
<|fim_suffix|>ontext: {}", e.getMessage(), e); } } @Override public void performHistoryReferenceActions(List<HistoryReference> hrefs) { Session session = Model.getSingleton().getSession(); // Manually create the UI shared contexts so any modifications are done // on an UI sh...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2014 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
<|fim_suffix|>* supported. Default are {@code SingleHttpMessageContainer} and {@code * SelectableHttpMessagesContainer}. * * @param httpMessageContainer the container that will be evaluated * @return the number of selected messages in the message container * @see SingleHttpMessageContainer ...
fim
zaproxy/zaproxy
java
<|fim_suffix|> return Model.getSingleton().getSession().getContext(sn.getNodeName()) == null; } if (context.isIncluded(sn) || context.isExcluded(sn)) { // Either explicitly included or excluded, so would have to change that regex in a non // trivial way to include! ...
fim
zaproxy/zaproxy
java
<|fim_suffix|>od that extracts a {@code SiteNode} from the given {@code historyReference}. * If no {@code SiteNode} is found {@code null} is returned. * * @param historyReference the history reference * @return the {@code SiteNode} or {@code null} if not found * @see #isButtonEnabledForHistoryR...
fim
zaproxy/zaproxy
java
<|fim_suffix|>*/ package org.zaproxy.zap.view.popup; import java.util.ArrayList; import java.util.List; import javax.swing.JMenuItem; import org.parosproxy.paros.extension.ExtensionPopupMenuItem; import org.parosproxy.paros.model.Model; import org.parosproxy.paros.model.Session; import org.parosproxy.paros.model.SiteN...
fim
zaproxy/zaproxy
java
<|fim_suffix|> } } <|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2014 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in c...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2014 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
<|fim_suffix|>stance(DateFormat.SHORT, DateFormat.MEDIUM); public DateFormatStringValue() {} /** This method is not threadsafe and should therefore only be called from the EDT */ @Override public String getString(Object value) { try { return DATE_TIME_FORMAT.format(value); ...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2014 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
<|fim_suffix|> * Copyright 2014 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
fim
zaproxy/zaproxy
java
<|fim_suffix|>("generic.value.disabled") + ')'; private static final Border BORDER = new EmptyBorder(2, 3, 3, 3); @Override @SuppressWarnings("rawtypes") public Component getListCellRendererComponent( JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { ...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2014 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2014 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * Yo...
fim
zaproxy/zaproxy
java
<|fim_suffix|>OUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.zaproxy.zap.view.table; import java.util.Arrays; import java.util.Map; import java.util.TreeMap; import javax.swing...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2014 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
<|fim_suffix|> hasColumn(sortedColumns, Column.HREF_TYPE) ? historyReference.getHistoryType() : null; hrefTypeInfo = hasColumn(sortedColumns, Column.HREF_TYPE_INFO) ? HrefTypeInfo.getFromType(historyReference.ge...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2014 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2014 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
<|fim_suffix|>*/ HistoryReference getHistoryReference(); /** * Returns the value of the entry for the given {@code column}. * * @param column the column whose entry value will be returned * @return the value of the entry for the given {@code column} */ Object getValue(Column column...
fim
zaproxy/zaproxy
java
<|fim_suffix|>nguage governing permissions and * limitations under the License. */ package org.zaproxy.zap.view.table; import javax.swing.table.TableModel; import org.parosproxy.paros.model.HistoryReference; /** * A {@code TableModel} specialised in displaying data of {@code HistoryReference}s and handling * them...
fim
zaproxy/zaproxy
java
/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2014 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * Yo...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2014 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in<|fim_suffix|>ing an ...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2020 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
<|fim_suffix|>private static final Icon NOTE_ICON = new ImageIcon( NoteTableCellItemIconHighlighter.class.getResource( "/resource/icon/16/022.png")); public NoteTableCellItemIconHighlighter(final int columnIndex) { super(columnIndex); } @...
fim
zaproxy/zaproxy
java
<|fim_suffix|> super(); // Force loading the UserManagement extension to make sure it's enabled. loadUsersManagementExtension(); UsersTableModel usersTableModel = usersExtension.getUIConfiguredUsersModel(contextId); this.usersListModel = new UsersListModel(usersTableModel); this...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2014 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
<|fim_suffix|> } }; } return actionListener; } private JPopupMenu getPopupMenu() { JPopupMenu popupMenu = new JPopupMenu(); String selected = this.getSelectedMenuItem(); for (String option : getMenuItemNames()) { JMenuItem item = ...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2016 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2014 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2<|fim_suffix|> default: return null; } } @Override public Class<?> getColumnClass(int colum...
fim
zaproxy/zaproxy
java
<|fim_suffix|>writable.file.chooser.write.diskspace.warning.dialog.title"), JOptionPane.YES_NO_OPTION); if (result != JOptionPane.YES_OPTION) { return; } } if (!Files.isWritable(selectedFile.getParentFile().toPath())) { warn...
fim
zaproxy/zaproxy
java
<|fim_suffix|> methodBase.addRequestHeader(headerA); Header hostHeader1 = header("Host", "example2.com"); methodBase.addRequestHeader(hostHeader1); Header headerB = header("B", "Value B"); methodBase.addRequestHeader(headerB); Header headerHost2 = header("Host", "Should Remo...
fim
zaproxy/zaproxy
java
<|fim_suffix|>lTo("hive_test_00.example.com"))); assertThat(uri.getPort(), is(equalTo(443))); assertThat(uri.getPath(), is(nullValue())); assertThat(uri.toString(), is(equalTo("hive_test_00.example.com:443"))); } } <|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * *...
fim
zaproxy/zaproxy
java
<|fim_suffix|>pportedExtensions)); } @Test void shouldNotAcceptFileArgumentIfRejectedBySupportedFileExtension(@TempDir Path folder) throws Exception { // Given String fileExtension = "test"; File testFile = Files.createFile(folder.resolve("aaa." + fileExtension)).toFile(...
fim
zaproxy/zaproxy
java
<|fim_suffix|> return name.startsWith("config-") && name.endsWith(".xml.bak"); }) .findFirst() .map(Path::getFileName) .map(Path::toString) .orElse(null); } } @Test void shouldUpg...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2016 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
<|fim_suffix|>()).willReturn(header); given(message.getResponseBody()).willReturn(body); return message; } } <|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2020 The ZAP Development Team ...
fim
zaproxy/zaproxy
java
<|fim_suffix|>; assertThat(alert.getRisk(), is(equalTo(plugin.getRisk()))); assertThat(alert.getConfidence(), is(equalTo(Alert.CONFIDENCE_MEDIUM))); assertThat(alert.getDescription(), is(equalTo(plugin.getDescription()))); assertThat(alert.getUri(), is(equalTo(URI))); assertThat(...
fim
zaproxy/zaproxy
java
<|fim_suffix|>s) { ArgumentCaptor<Alert> arg = ArgumentCaptor.forClass(Alert.class); verify(hostProcess).alertFound(arg.capture()); return arg.getValue(); } } <|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web applicatio...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2020 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2022 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2020 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
<|fim_suffix|>tain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * S...
fim
zaproxy/zaproxy
java
<|fim_suffix|> void shouldNotBeEqualToExtendedNameValuePair() { // Given NameValuePair nameValuePair = new NameValuePair(1, NAME, VALUE, 2); NameValuePair otherNameValuePair = new NameValuePair(1, NAME, VALUE, 2) { // Anonymous NameValuePair }; // Whe...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2015 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2015 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
<|fim_suffix|> exclude = param.isExcludeAntiCsrfTokens(); // Then assertThat(exclude, is(equalTo(value))); } @ParameterizedTest @ValueSource(booleans = {true, false}) void shouldSetExcludeAntiCsrfTokensToConfiguration(boolean value) { // Given / When param.setExcludeAnti...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for a<|fim_suffix|>se. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under t...
fim
zaproxy/zaproxy
java
<|fim_suffix|> } }; List<org.zaproxy.zap.model.NameValuePair> parameters = parameters(parameter("a", "b"), parameter("c", "d"), parameter("e", "f")); variantAbstractQuery.setParameters(NAME_VALUE_PAIR_TYPE, parameters); HttpMessage message = createMessage(); ...
fim
zaproxy/zaproxy
java
/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2016 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * Yo...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2020 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
<|fim_suffix|>ath.getParamList().get(0).getName(), is("«param1»")); assertThat(variantDdnPath.getParamList().get(0).getValue(), is("value1")); assertThat(variantDdnPath.getParamList().get(1).getName(), is("«param2»")); assertThat(variantDdnPath.getParamList().get(1).getValue(), is("value2")); ...
fim
zaproxy/zaproxy
java
<|fim_suffix|>Given VariantHeader variantHeader = new VariantHeader(); HttpMessage message = createMessageWithHeaders(header("host", "X")); variantHeader.setMessage(message); // When String injectedHeader = variantHeader.setParameter(message, header("host", "X", 0...
fim
zaproxy/zaproxy
java
/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2017 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * Yo...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2017 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2013 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2025 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2020 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2025 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
<|fim_suffix|> assertThrows(NullPointerException.class, () -> database.setDatabaseOptions(options)); } } <|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2023 The ZAP Development Team * * Licensed...
fim
zaproxy/zaproxy
java
/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2023 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * Yo...
fim
zaproxy/zaproxy
java
<|fim_suffix|>tiveActions()).willAnswer(this::throwThrowable); extensionLoader.addExtension(extensionA); Extension extensionB = mock(Extension.class); given(extensionB.getActiveActions()).willReturn(null); extensionLoader.addExtension(extensionB); Extension extensionC = mock(Exte...
fim
zaproxy/zaproxy
java
<|fim_suffix|>estSend(msg); // Then verifyNoInteractions(msg); } } <|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2023 The ZAP Development Team * * Licensed under the Apache License, V...
fim
zaproxy/zaproxy
java
<|fim_suffix|>language governing permissions and * limitations under the License. */ package org.parosproxy.paros.model; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doThrow; import java.io.File; import java.io.IOExcepti...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2020 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2020 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2023 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2024 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2018 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * Yo...
fim
zaproxy/zaproxy
java
<|fim_suffix|>_DEFAULT_CHARSET)) .willReturn(BODY_1_AND_2_BYTES_DEFAULT_CHARSET); httpBody.setContentEncodings(asList(encoding)); // When httpBody.append(BODY_2_STRING); // Then assertThat(httpBody.length(), is(equalTo(BODY_1_AND_2_BYTES_DEFAULT_CHARSET.length)));...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * <|fim_suffix|>eaderField = new HttpHeaderField(name, value); HttpHeaderField otherEqualHttpHeaderField = new HttpHeaderField(name, value); // When boolean equals = headerField.equals(otherEqualHttpHeaderField); /...
fim
zaproxy/zaproxy
java
/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2024 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * Yo...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2020 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2018 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
<|fim_suffix|>arams() { // Given HttpRequestHeader header = createRequestHeaderWithCookies(); TreeSet<HtmlParameter> cookies = parameters(cookieParam("c1", "v1"), cookieParam("c2", "v2"), cookieParam("", "v3")); // When header.setCookieParams(cookies); // ...
fim
zaproxy/zaproxy
java
/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2017 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * Yo...
fim
zaproxy/zaproxy
java
<|fim_suffix|>ontext.class); given(impl.createContext(any(), anyInt())).willReturn(createdCtx); HttpSenderContext getCtx = mock(HttpSenderContext.class); given(impl.getContext(any())).willReturn(getCtx); // When HttpSender httpSender = new HttpSender(1); httpSender.sendAn...
fim
zaproxy/zaproxy
java
<|fim_suffix|>tring(); // Then assertThat(string, is(equalTo("1.2.3"))); } } <|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2015 The ZAP Development Team * * Licensed under the Apache ...
fim
zaproxy/zaproxy
java
<|fim_suffix|>); model = mock(Model.class, withSettings().defaultAnswer(CALLS_REAL_METHODS)); Model.setSingletonForTesting(model); extensionLoader = mock(ExtensionLoader.class, withSettings().strictness(Strictness.LENIENT)); // Init all the things Constant.getI...
fim
zaproxy/zaproxy
java
<|fim_suffix|>t.getLogger(UncaughtExceptionLogger.class.getCanonicalName()); context.getConfiguration().addLoggerAppender(logger, testAppender); logger.setLevel(Level.ERROR); } private void assertLogEvent( Log4jTestAppender.AppendedLogEvent logEvent, String messa...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2026 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
<|fim_suffix|> given(user.getAuthenticationState()).willReturn(new AuthenticationState()); // When/Then assertThat(method.isAuthenticated(loginMessage, user), is(true)); } @Test void shouldIdentifyLoggedOutResponseHeaderWhenLoggedOutIndicatorIsSet() { // Given method.set...
fim
zaproxy/zaproxy
java
<|fim_suffix|>questHeader.getHeader("Authorization"), is("Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyIn0:signature")); assertThat(requestHeader.getHeader("X-Custom-Time"), is("2025-07-19T10:30:45.123Z")); assertThat(requestHeader.getHeader("Content-Type"), is("application/json")); }...
fim
zaproxy/zaproxy
java
<|fim_suffix|>n assertThat(equals, is(false)); } @Test void shouldNotBeEqualToAuthenticationMethodWithJustDifferentLoggedInIndicator() { // Given String loggedOutIndicator = "loggedOutIndicator"; AuthenticationMethod authMethod = createAuthenticationMethod("l...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2020 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2020 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2020 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
<|fim_suffix|>("type"), containsString("UsernamePasswordAuthenticationCredentials"))); } } <|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2016 The ZAP Development Team * * Lice...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2018 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this <|fim_suffix|>hen IllegalAr...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2012 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2020 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2021 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
<|fim_suffix|>Stream> addOnConsumer) { try { Files.createDirectories(dir); Path file = dir.resolve(fileName); try (ZipOutputStream zos = new ZipOutputStream(Files.newOutputStream(file))) { ZipEntry manifest = new ZipEntry(AddOn.MANIFEST_FILE_NAME); ...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2012 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java
<|fim_suffix|>nsion ext : extensions) { map.put(ext.getClass(), ext); } return map; } private static class ExtensionImpl extends ExtensionAdaptor { private final List<Class<? extends Extension>> dependencies = new ArrayList<>(); ExtensionImpl(Extension... dependenc...
fim
zaproxy/zaproxy
java
<|fim_suffix|>Tasks.task(0).type", "UNINSTALL_ADD_ON"); config.setProperty("postponedTasks.task(0).addOn", file.toString()); // When postponedTasks = new PostponedTasksRunner(config, aoc); // Then assertUninstallAddOnTask(0, file); } @ParameterizedTest @ValueSource(s...
fim
zaproxy/zaproxy
java
<|fim_suffix|>on>", "<id>" + addOnId + "</id>", "<version>" + version + "</version>", "</addon>", "</addons>", "</dependencies>", "</extension>", "</ext...
fim
zaproxy/zaproxy
java
<|fim_suffix|>e(new ZapRelease("1.4.1"), new ZapRelease(DEV_BUILD)) < 0); assertTrue(zrc.compare(new ZapRelease("2.4.beta"), new ZapRelease(DEV_BUILD)) < 0); assertTrue(zrc.compare(new ZapRelease("2.0.0"), new ZapRelease("2.0.0.1")) < 0); assertTrue(zrc.compare(new ZapRelease("2.0.alpha"), new Z...
fim
zaproxy/zaproxy
java
<|fim_prefix|>/* * Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2012 The ZAP Development Team * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
fim
zaproxy/zaproxy
java